c++.chat - Fast variables (8/16/32 bit)
- Keith Fuller (11/11) May 05 2003 Hello.
- Walter (4/15) May 05 2003 On later intel processors, 32 bits.
- Javier Gutiérrez (5/30) May 07 2003 The general rule is that the natural word machines are the faster.
- roland (8/44) May 08 2003 hum .. it seems to me that it depend on the model too. manipulating 32
- Shawn Poulson (7/8) Jun 20 2003 My understanding is that 386 and newer processors are well optimized for
- Keith Fuller (4/9) Jun 24 2003 I think it is more a matter of memory access.
- Javier Gutiérrez (7/19) Jun 25 2003 Yes, it is a memory issue.
Hello. I have a question that I have been curious about for some time. Let's say I have to represent an integer that can only have values between 1 and 10. In general, which would be the fastest? 8-bit byte 16-bit short 32-bit integer Cheers! Keith Fuller keithfx hawtmail.com (<--you know what I mean)
May 05 2003
On later intel processors, 32 bits. "Keith Fuller" <Keith_member pathlink.com> wrote in message news:b9689u$n73$1 digitaldaemon.com...Hello. I have a question that I have been curious about for some time. Let's say I have to represent an integer that can only have values between1 and10. In general, which would be the fastest? 8-bit byte 16-bit short 32-bit integer Cheers! Keith Fuller keithfx hawtmail.com (<--you know what I mean)
May 05 2003
The general rule is that the natural word machines are the faster. 16 bit for 286 or lower, 32 bit for 386+. "Walter" <walter digitalmars.com> escribió en el mensaje news:b96hk1$10dq$1 digitaldaemon.com...On later intel processors, 32 bits. "Keith Fuller" <Keith_member pathlink.com> wrote in message news:b9689u$n73$1 digitaldaemon.com...betweenHello. I have a question that I have been curious about for some time. Let's say I have to represent an integer that can only have values1 and10. In general, which would be the fastest? 8-bit byte 16-bit short 32-bit integer Cheers! Keith Fuller keithfx hawtmail.com (<--you know what I mean)
May 07 2003
hello Javier Gutiérrez a écrit:The general rule is that the natural word machines are the faster. 16 bit for 286 or lower, 32 bit for 386+.hum .. it seems to me that it depend on the model too. manipulating 32 bit datas with 16 bit registers is quite slow ! at least 16 bit datas should be aligned on 32 bit boundary using 32 bit registers on 16 bit model ? it works (use assembly) i don't know if it is faster but i know it adds a 8 bit opcode. roland"Walter" <walter digitalmars.com> escribió en el mensaje news:b96hk1$10dq$1 digitaldaemon.com...On later intel processors, 32 bits. "Keith Fuller" <Keith_member pathlink.com> wrote in message news:b9689u$n73$1 digitaldaemon.com...betweenHello. I have a question that I have been curious about for some time. Let's say I have to represent an integer that can only have values1 and10. In general, which would be the fastest? 8-bit byte 16-bit short 32-bit integer Cheers! Keith Fuller keithfx hawtmail.com (<--you know what I mean)
May 08 2003
"Walter" <walter digitalmars.com> wrote in message news:b96hk1$10dq$1 digitaldaemon.com...On later intel processors, 32 bits.My understanding is that 386 and newer processors are well optimized for simple algebra with 8/16/32-bit registers. Any add/sub operation will only take 1 clock (or close to it) regardless if it's using AL, AX, or EAX. However, I'm not sure how it reacts with div/mul. I would be interested in seeing someone profile these types of operations.
Jun 20 2003
I think it is more a matter of memory access. Inside the CPU, yes, it probably doesn't matter. keithfx h*tmail.com In article <bd0kr0$mq2$1 digitaldaemon.com>, Shawn Poulson says...My understanding is that 386 and newer processors are well optimized for simple algebra with 8/16/32-bit registers. Any add/sub operation will only take 1 clock (or close to it) regardless if it's using AL, AX, or EAX. However, I'm not sure how it reacts with div/mul. I would be interested in seeing someone profile these types of operations.
Jun 24 2003
Yes, it is a memory issue. You can get the complete info at http://www.penguin.cz/~literakl/intel/intel.html "Keith Fuller" <Keith_member pathlink.com> escribió en el mensaje news:bd9pv0$1klh$1 digitaldaemon.com...I think it is more a matter of memory access. Inside the CPU, yes, it probably doesn't matter. keithfx h*tmail.com In article <bd0kr0$mq2$1 digitaldaemon.com>, Shawn Poulson says...onlyMy understanding is that 386 and newer processors are well optimized for simple algebra with 8/16/32-bit registers. Any add/sub operation willoperations.take 1 clock (or close to it) regardless if it's using AL, AX, or EAX. However, I'm not sure how it reacts with div/mul. I would be interested in seeing someone profile these types of
Jun 25 2003