[BLACKBOX] FW: [BLACKBOX] INTEGER arithmetic speed

From: Campbell, Robert (SELEX GALILEO, UK) <robert.d.campbell{([at]})nowhere.xy>
Date: Thu, 20 Oct 2011 10:11:09 +0100

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

 

>> -----Original Message-----
>> From: Campbell, Robert (SELEX GALILEO, UK)
>> Sent: 20 October 2011 10:03
>> To: 'chris{([at]})nowhere.xy
>> Subject: RE: [BLACKBOX] INTEGER arithmetic speed
>>
>>
>>
>> >> -----Original Message-----
>> >> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>> Behalf Of Chris
>> >> Burrows
>> >> Sent: 19 October 2011 22:25
>>
>> >> >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?
>> >> >
>> >>
>> >> 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
>>
>>
>> What is a 64-bit CPU as opposed to a 32-but one?
>>
>> The 32-bit chips support the IA-32 Architecture (see
>> reference: Intel(r) 64 and IA-32 Architectures Software
>> Developer's Manual, Volume 1:, Basic Architecture - a free
>> 2.4 Mbyte pdf download).
>>
>> 64-bit chips support the Intel 64 architecture which
>> includes the IA-32 architecture, but also includes the new
>> "IA-32e mode with 64-bit sub-mode" which needs to be enabled
>> by the operating system on a code- segment basis (see para 3.1.1).
>>
>> So, I guess, unless this sub-mode is enabled a 64-bit chip
>> is merely a 32-bit chip + some unused transistors.
>>
>>
>> I suspect that most chips bought in the last 6 years are
>> 64-bit chips; at least for desktop machines.
>>
>>
>> I guess that Windows XP does not turn on the 64-bit sub-mode.
>> I guess that Windows XP 64 does not turn on the 64-bit
>> sub-mode when using WoW64.
>> I guess that the BlackBox compiler does not generate any
>> 64-bit instructions.
>>
>> So, I guess, the issue of 64-bit chips is not the answer.
>>
>>
>>
>> However I have now run my algorithm on two different systems:
>>
>> 1) BlackBox under WOW64 under Windows XP 64 using a dual
>> core 3-year old 64-bit AMD Family 15 Model 65 chip.
>>
>> 2) BlackBox under Windows XP using a single core 6-year old
>> 64-bit AMD Athlon chip.
>>
>>
>> The results were essentially identical!
>>
>>
>> Maybe it is an AMD thing, and Intel chips would tell a
>> different story. I don't buy Intel chips on principal
>> because of the way they handled the 'Pentium bug'.
>>
>>
>>
>> I too had heard that BlackBox uses the FPU for LONGINTs,
>> which seems like the most likely answer. I can't remember
>> where I heard the FPU story, or if it was a reliable source.
>>
>>
>> It would be interesting to know if anyone had observed this
>> LONGINT speed-up on an Intel machine.
>>
>>
>> Cheers
>>
>> Robert
>>
SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1277164213_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwICBccGFyDQpccGFyDQo+PiAtLS0t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VJWQExJ
U1RTLk9CRVJPTi5DSH19ACAgICA
----boundary-LibPST-iamunique-1277164213_-_---
Received on Thu Oct 20 2011 - 11:11:09 UTC

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