Message-ID: <38CE53D6.208D75E2@hotmail.com> Date: Tue, 14 Mar 2000 15:59:35 +0100 From: Jesus Gil y Gil X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: Fastest integer type References: <200003140840 DOT JAA19626 AT mars DOT lu DOT erisoft DOT se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Martin Stromberg wrote: > The standard says you should provide types that are the fastest on the > platform (the definition of fastest is up to the platform) for integer > types that are at least 8, 16, 32 and 64 bits. I know that ints (32 > bits) are faster than shorts (16 bits) in DJGPP, right? > > Are ints (32 bits) faster than chars (8 bits)? > > Right, > > MartinS You should run the benchmark that I posted 3 days ago to djgpp AT delorie DOT com, it will carify your dudes by yourself. The speed depends of the processor: - In 486 the fastest are 16 and 32 bits integers, chars are only a few slower, floats are more slow than integers, and double slowest. - In Pentium 8 bit integers are the fastest, 16 bits are faster and 32 bits even more faster, floats and doubles the same speed, a bit slower that 16 bits integers. - In AMD K6 all types, 8,16,32 bits integer and float are equally faster. - In Pentium II and III, 8 bits are two times more slow than all the other types, 16 bits are much more faster, and 32 bits the fastest again, floats are equally fast than 32 bits integers, and doubles practically the same. I expect I've helped you.