diff options
| author | flatmush <flatmush@d3e1167c-abe1-51d5-8199-f9061ebe54e4> | 2011-02-24 16:23:50 +0000 |
|---|---|---|
| committer | flatmush <flatmush@d3e1167c-abe1-51d5-8199-f9061ebe54e4> | 2011-02-24 16:23:50 +0000 |
| commit | d3482256c277dff8cd6243dae0f72df1a4c676d3 (patch) | |
| tree | fb34a3f7ac03243e55f7cc3053e48c596a490e17 /fixtest/fixtest.cbp | |
| parent | 0e06a1e8b7fe9bb31437d8612d62bee85df2e43f (diff) | |
| download | libfixmath-d3482256c277dff8cd6243dae0f72df1a4c676d3.tar.gz | |
Added a small program called fixtest which currently tests performance and average error on x86 platforms, currently it produces quite wildly varying results depending on the input values.
The average error seems to vary between 3-8%, it's possible that setting iter to a higher value (and pass to a lower one) could give a more stable value.
Fixed point seems to be slower overall on x86 (50% of float) with good floating point hardware, however with the caching enabled depending on the program the fixed point implementation may be much faster (as float would be if cached).
With caching enabled there is a massive difference between and iter size below and above 4096, this is because the caching mechanism thrashes above this threshold, it probably makes sense to disable caching for these tests by compiling libfixmath with FIXMATH_NO_CACHE.
Diffstat (limited to 'fixtest/fixtest.cbp')
| -rw-r--r-- | fixtest/fixtest.cbp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/fixtest/fixtest.cbp b/fixtest/fixtest.cbp new file mode 100644 index 0000000..2671252 --- /dev/null +++ b/fixtest/fixtest.cbp @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="fixtest" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="dbg"> + <Option output="bin\dbg\fixtest" prefix_auto="1" extension_auto="1" /> + <Option object_output="obj\dbg\" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-g" /> + </Compiler> + </Target> + <Target title="rel"> + <Option output="bin\rel\fixtest" prefix_auto="1" extension_auto="1" /> + <Option object_output="obj\rel\" /> + <Option type="1" /> + <Option compiler="gcc" /> + <Compiler> + <Add option="-O2" /> + </Compiler> + <Linker> + <Add option="-s" /> + </Linker> + </Target> + </Build> + <Compiler> + <Add option="-Wall" /> + <Add directory="..\" /> + </Compiler> + <Linker> + <Add library="..\libfixmath\libfixmath.a" /> + </Linker> + <Unit filename="hiclock.c"> + <Option compilerVar="CC" /> + </Unit> + <Unit filename="hiclock.h" /> + <Unit filename="main.c"> + <Option compilerVar="CC" /> + </Unit> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + <lib_finder disable_auto="1" /> + </Extensions> + </Project> +</CodeBlocks_project_file> |
