Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why are SINGLE variables faster than INTEGER variables ?
#16
(06-28-2025, 12:13 AM)ahenry3068 Wrote: Also when using Integer's the NATIVE REGISTER SIZE is going to be fastest.

i think the cpu is garbage.  if it cannot do calculations involving smaller integers than its general purpose register size.  faster than floating point.  if the cpu is 64-bit.  which is way faster than intel 486dx for example.

it could be understood with 16-bit.  especially how intel tried to get more profits.  by just leaving out fpu.  or doing other stupid things before it invented celeron.  and going even further such as denormalizing problems we still have to deal with now on "x86" architecture.

we're not going to have 128-bit in the near future.  imagine having to shuffle 16 bytes at a time?  but the programmer needs only two bytes at a time?  if that's slower than figuring out a transcedental number to 100 digits.  then it simply means poor design.  sadly poor design has become price leader in many cases.  on computers being considered e-waste after.  ummm, five years after manufacture.  and even less time in the future.

so much for "register int" overused in a lot of legacy c code.  it won't be necessary any longer.  if declaring something as "long double" is faster instead.

this is just my opinion.
Reply


Messages In This Thread
RE: Why are SINGLE variables faster than INTEGER variables ? - by hsiangch_ong - 07-05-2025, 07:57 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)