Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
programming:c-cpp-performance [2011/01/18 04:08] 127.0.0.1 external edit |
programming:c-cpp-performance [2013/09/19 16:40] (current) |
||
|---|---|---|---|
| Line 121: | Line 121: | ||
| ==== Other profilers ==== | ==== Other profilers ==== | ||
| - | sysprof and oprofile are other profiles | + | sysprof and oprofile are other profilers |
| ==== Traps ==== | ==== Traps ==== | ||
| Line 226: | Line 226: | ||
| More simple names are available in GCC headers: | More simple names are available in GCC headers: | ||
| - | * SSE for float (< | + | * SSE for float (< |
| - | * SSE2 for int (< | + | * SSE2 for int (< |
| + | * SSE2 int/float conversions: | ||
| And you have to compile with GCC flags -msse and -msse2, or one -march that supports it. | And you have to compile with GCC flags -msse and -msse2, or one -march that supports it. | ||
| Line 239: | Line 240: | ||
| #include < | #include < | ||
| struct timeval tv; | struct timeval tv; | ||
| - | struct timezone tz; | + | gettimeofday(& |
| - | gettimeofday(& | + | |
| unsigned microseconds = tv.tv_sec*1000000 + tv.tv_usec; // beware overflows | unsigned microseconds = tv.tv_sec*1000000 + tv.tv_usec; // beware overflows | ||
