Re: [BLACKBOX] INTEGER arithmetic speed

From: [at]} <Chris>
Date: Thu, 20 Oct 2011 07:55:04 +1030

----boundary-LibPST-iamunique-1853102625_-_-
Content-type: text/plain

>-----Original Message-----
>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Campbell, Robert (SELEX GALILEO, UK)
>Sent: Thursday, 20 October 2011 1:24 AM
>To: BLACKBOX{([at]})nowhere.xy
>Subject: [BLACKBOX] INTEGER arithmetic speed
>
>I have developed an algorithm that uses LONGINTs, and for a
>particular input takes
>3.5 minutes to run.
>
>I don't always need such large numbers, so I cut-and-pasted an
>INTEGER version, which gives the same results for this input,
>but takes 5 minutes.
>
>
>Is this a freak result (maybe to do with cache boundaries or
>something), or is it a general situation that INTEGER
>arithmetic is 50% slower than LONGINT arithmetic
>- the algorithm has a
>varied mix of MODs, DIVs, adds, PROCEDURE calls, and
>assigments to & from ARRAYs?
>

Just guessing - maybe this is a consequence of running on a 64-bit CPU? If
that is what you are using try the same test on a 32-bit system if you can
find one,

Regards,
Chris

Chris Burrows
CFB Software
http://www.cfbsoftware.com


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1853102625_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIw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Gdvcml0aG0gaGFzIGFccGFyDQo+dmFyaWVkIG1peCBvZiBNT0RzLCBE
SVZzLCBhZGRzLCBQUk9DRURVUkUgY2FsbHMsIGFuZCBccGFyDQo+YXNzaWdtZW50cyB0byAmIGZy
b20gQVJSQVlzP1xwYXINCj5ccGFyDQpccGFyDQpKdXN0IGd1ZXNzaW5nIC0gbWF5YmUgdGhpcyBp
cyBhIGNvbnNlcXVlbmNlIG9mIHJ1bm5pbmcgb24gYSA2NC1iaXQgQ1BVPyBJZlxwYXINCnRoYXQg
aXMgd2hhdCB5b3UgYXJlIHVzaW5nIHRyeSB0aGUgc2FtZSB0ZXN0IG9uIGEgMzItYml0IHN5c3Rl
bSBpZiB5b3UgY2FuXHBhcg0KZmluZCBvbmUsXHBhcg0KXHBhcg0KUmVnYXJkcyxccGFyDQpDaHJp
c1xwYXINClxwYXINCkNocmlzIEJ1cnJvd3NccGFyDQpDRkIgU29mdHdhcmVccGFyDQpodHRwOi8v
d3d3LmNmYnNvZnR3YXJlLmNvbVxwYXINClxwYXINClxwYXINCi0tLS1ccGFyDQpUbyB1bnN1YnNj
cmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNU
U0VSVkBMSVNUUy5PQkVST04uQ0hcfX0AAIDY
----boundary-LibPST-iamunique-1853102625_-_---
Received on Wed Oct 19 2011 - 23:25:04 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:10 UTC