Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are SINGLE variables faster than INTEGER variables ?
#9
   

Got to say, I'm surprised by your results.  What type of machine are you running this on, just out of curiosity?  Is this something which deeply affects time on Linux/Mac?  Arm?  Or 32-bit machines? 

As you can see, my results don't match up with yours at all.  I'm just curious what the difference might be that's causing such a large change in times and results.

(06-27-2025, 02:26 PM)Kernelpanic Wrote:
Quote:SMcneill -  Integer Division (the \ division) is much faster than taking the integer value of normal division, as shown above.

x \ y is faster than INT(x / y).   At least, it always has been for me on Windows with the math processors on my PCs and Laptops.  Perhaps Linux or Mac handles them differently somehow?
This is always faster because only need to determine how many times the divisor is included in the dividend. This is easier for the computer than regular division.

Apparently not always, as per the times posted above yours.  SINGLE is faster without integer division, which really blows my mind!  I really wonder what type of machine/architecture gives such results.  Wink
Reply


Messages In This Thread
RE: Why are SINGLE variables faster than INTEGER variables ? - by SMcNeill - 06-27-2025, 03:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _NEWIMAGE can't accept variables as dimensions? bobalooie 23 924 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 643 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,385 01-29-2025, 11:12 PM
Last Post: Pete
  Determine a value is INTEGER TerryRitchie 17 3,265 07-27-2024, 05:03 PM
Last Post: Kernelpanic
  Is there a faster way to do this glow circle effect? Dav 11 2,069 06-16-2024, 11:51 PM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)