[muscle] Re: MUSCLE and MASM (Visual C inline assembler)...

  • From: Jeremy Friesner <jaf@xxxxxxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Thu, 17 Feb 2005 10:16:56 -0800

On Thursday 17 February 2005 10:04, Mika Lindqvist wrote:
> testendian.cpp didn't compile, whined about redeclaration of variable
> 'i'...

Ah, I see.  I'll fix that for the next release.

> After fixing it, here is the results: 

Cool...  just for comparison, here are the results I get from my machine (dual 
2GHz Opteron running SUSE 9.1 in 32 bit mode, compiled under gcc with -O3).  
Presumably you should be able to get a similar (5-10x) speedup from your 
assembly functions if they are working efficiently.

NOTE:  USING x86 inline assembly swap functions!
testing B_HOST_TO_LENDIAN_* ...
testing B_LENDIAN_TO_HOST_* ...
testing B_HOST_TO_BENDIAN_* ...
testing B_BENDIAN_TO_HOST_* ...
Correctness test complete.
 Now doing speed testing....
B_SWAP_INT16 exercise took 16ms to complete.
B_SWAP_INT32 exercise took 12ms to complete.
B_SWAP_INT64 exercise took 38ms to complete.
B_SWAP_FLOAT exercise took 12ms to complete.
B_SWAP_DOUBLE exercise took 38ms to complete.

--------------------------------

NOTE:  Using unoptimized C++ swap functions.
testing B_HOST_TO_LENDIAN_* ...
testing B_LENDIAN_TO_HOST_* ...
testing B_HOST_TO_BENDIAN_* ...
testing B_BENDIAN_TO_HOST_* ...
Correctness test complete.
 Now doing speed testing....
B_SWAP_INT16 exercise took 107ms to complete.
B_SWAP_INT32 exercise took 132ms to complete.
B_SWAP_INT64 exercise took 203ms to complete.
B_SWAP_FLOAT exercise took 136ms to complete.
B_SWAP_DOUBLE exercise took 200ms to complete.

Other related posts: