flat assembler
Message board for the users of flat assembler.
Index
> Windows > struct's, macro's and fpu Vector's |
Author |
|
bitRAKE 13 Nov 2008, 05:32
Check out Agner Fog's optimization manual/tools. Basically, there are many factors effecting the actual performance of an algorithm; and as the complexity increases the best that can be done it to test and document the conditions under which you are experiencing a particular metric. Providing a test program allow others to offer results for other configurations. Cycle counts can be approximated with RDTSC and performance counters help to see what is going on under the hood.
http://www.agner.org/optimize/ I just watched a talk I thought was decent: Machine Architecture: Things Your Programming Language Never Told You, http://www.nwcpp.org/Meetings/2007/09.html . it applies to assembly language, too. |
|||
13 Nov 2008, 05:32 |
|
bitshifter 14 Nov 2008, 02:01
Great set of resources!
The block tester says that my abs() is 3 times faster than C/C++ std::abs()! One question, the charts show a part in the fpu section about clock cycle overlap if the next instruction is of type fpu. Can someone explain this to me how this works. |
|||
14 Nov 2008, 02:01 |
|
f0dder 14 Nov 2008, 02:20
bitshifter wrote: The block tester says that my abs() is 3 times faster than C/C++ std::abs()! Which C++ implementation (and version), though? And does it involve CALLing a routine, or is compiler intrinsics used? Are you calling fabs() on float or double values? (on float, it likely involves float->double->fabs()->float on some compilers). Not trying to bash you, just saying that there's a lot to benchmarking (different CPUs being somewhat of a pain sometimes), and there's no such thing as "C/C++" when discussing speed, you need to name the full platform, since there's quite some differences in regards to standard-library quality and compiler code generation. Sometimes I wish we were back at the Pentium [U,V] pipes, it was easier to optimize back then. There's a lot of rules these days, sometimes it almost feels that optimizing x86 code these days is nondeterministic (yeah yeah, I suck). _________________ - carpe noctem |
|||
14 Nov 2008, 02:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.