Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are SINGLE variables faster than INTEGER variables ?
#17
Nobody has really given you a straight answer  Tongue The reason SINGLE can be faster is because "/" division is always floating point. When you use it with integer types they first get converted to SINGLE and then those get divided the same as regular SINGLEs, so making them integers just adds an extra step.

I'd also say separately the advice of "native integer size" is less relevant for modern processors, x86 can handle all the sizes just fine. The issue is a bigger deal for less powerful processors with more limited instruction sets, no cache, etc.
Reply


Messages In This Thread
RE: Why are SINGLE variables faster than INTEGER variables ? - by DSMan195276 - 07-05-2025, 09:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _NEWIMAGE can't accept variables as dimensions? bobalooie 23 911 02-18-2026, 11:16 PM
Last Post: Unseen Machine
  generating a random number in the full range of that number? (Integer, Long) madscijr 2 641 05-01-2025, 09:11 PM
Last Post: madscijr
  testing a number's quare root is an integer and casting to a value? madscijr 22 3,374 01-29-2025, 11:12 PM
Last Post: Pete
  Determine a value is INTEGER TerryRitchie 17 3,260 07-27-2024, 05:03 PM
Last Post: Kernelpanic
  Is there a faster way to do this glow circle effect? Dav 11 2,067 06-16-2024, 11:51 PM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)