Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programming:instruction-timings [2006/12/13 19:38]
cyril
programming:instruction-timings [2013/09/19 16:41]
Line 1: Line 1:
-====== Instruction timings ====== 
- 
-Here are some results of timings I've done of several instructions in C/C++, to compare several ways to do one thing. 
- 
-===== Proceeding ===== 
- 
- 
-===== Summary of results ===== 
- 
-Depending on machines, floating point operations can be a lot slower than integer operations, or as fast, or even faster. 
- 
-Multiprocessor configs and multicore processors doesn't bring any improvement on these tests, and that's normal. Indeed in order to exploit it you have to have several threads, which is not the case here, and not the purpose. 
- 
-===== All results ===== 
- 
-All timings are given in nanoseconds (ns). 
- 
-^  Title  ^  Code  ^  Cyril_F  ^  Cyril_P  ^  cJ_F  ^  cJ_P  ^  Infomob  ^  Almighty  ^  PC104  ^ 
-^  RGB -> Y Conversion  ^^^^^^^^^ 
-|Float  |''imgg[k2++] = (0.299*img[k++] + 0.587*img[k++] + 0.114*img[k++]);''  |  175  |  |  |  6.09 ??!  |  20.8  |  12.6  |  84.3  | 
-|Integer  |''imgg[k2++] = (19595*img[k++] + 38470*img[k++] + 7471*img[k++]) >> 16;''  |  91.1  |  |  |  |  25.1  |  4.03  |  153  | 
-|Shift1 |''imgg[k2++] = (img[k++]>>2 + img[k]>>1 + img[k++]>>3 + img[k++]>>3);''  |  50.4  |  |  |  |  10.6  |  5.97  |  29.3  | 
-|Shift2 |''imgg[k2++] = (img[k]>>2 + img[k++]>>4 + img[k]>>1 + img[k++]>>4 + img[k++]>>3);''  |  56.7  |  |  |  |  11.7 |  6.65  |  43.4  | 
- 
- 
- 
-===== Configs used ===== 
- 
-==== Summary ==== 
- 
-^  ^  CPU  ^  Frequence  ^  Arith. Coproc.  ^  Bogomips  ^  FPU  ^  Cache  ^  GCC Version  ^ 
-^Cyril_F  |Celeron Mendocino  |500 MHz | |1003  |yes  |128 KB| | 
-^Cyril_P  |AMD64 3000+  |1.8 GHz  | | | | | |  
-^cJ_F  | | | | | | | |  
-^cJ_P  | | | | | | | |  
-^Infomob |Tri-Xeon  |2.80 GHz  | |5570  |yes  |512KB  |  | 
-^Almighty  |PentiumD (DualCore64)  |3.4 GHz  | |6800  |yes  |2048 KB  |  | 
-^PC104  |Transmeta Crusoe TM5400  |500 MHz  | |997  |yes  |256 KB  |3.4.6  | 
- 
- 
- 
-==== /proc/cpuinfo ==== 
- 
- 
- 
  
programming/instruction-timings.txt ยท Last modified: 2013/09/19 16:41 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0