[muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- From: "Mika Lindqvist" <linki@xxxxxxx>
- To: <muscle@xxxxxxxxxxxxx>
- Date: Thu, 17 Feb 2005 20:04:53 +0200
testendian.cpp didn't compile, whined about redeclaration of variable 'i'...
After fixing it, here is the results:
C:\build\testendian\Debug>testendian.exe
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 343ms to complete.
B_SWAP_INT32 exercise took 328ms to complete.
B_SWAP_INT64 exercise took 1078ms to complete.
B_SWAP_FLOAT exercise took 890ms to complete.
B_SWAP_DOUBLE exercise took 2437ms to complete.
C:\build\testendian\Debug>testendian.exe
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 531ms to complete.
B_SWAP_INT32 exercise took 625ms to complete.
B_SWAP_INT64 exercise took 1031ms to complete.
B_SWAP_FLOAT exercise took 1171ms to complete.
B_SWAP_DOUBLE exercise took 1906ms to complete.
It seems INT64 and DOUBLE tests took longer with assembler optimizations
(1078 ms vs. 1031 ms and 2437 ms vs. 1902 ms) but I only did tests once so
results might vary if I would do more tests and take average...
> -----Original Message-----
> From: muscle-bounce@xxxxxxxxxxxxx
> [mailto:muscle-bounce@xxxxxxxxxxxxx] On Behalf Of Jeremy Friesner
> Sent: Thursday, February 17, 2005 7:40 PM
> To: muscle@xxxxxxxxxxxxx
> Subject: [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
>
>
> Hi Mika,
>
> I know nothing about MASM, I just wanted to note that there is a
> test/testendian.cpp program in MUSCLE that you can run to
> test whether your
> swap functions are working correctly.... you can also use it
> to see how much
> of a speedup you get with the inline assembly functions
> enabled versus
> disabled.
>
> Good luck,
> Jeremy
>
- Follow-Ups:
- [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- From: Jeremy Friesner
- References:
- [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- From: Jeremy Friesner
Other related posts:
- » [muscle] MUSCLE and MASM (Visual C inline assembler)...
- » [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- » [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- » [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- From: Jeremy Friesner
- [muscle] Re: MUSCLE and MASM (Visual C inline assembler)...
- From: Jeremy Friesner