Changeset 3563
- Timestamp:
- Jul 22, 2009, 2:09:34 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/pipi/filter/median.c
r3342 r3563 29 29 static int cmpint(void const *i1, void const *i2) 30 30 { 31 return *(double const *)i1 < *(double const *)i2; 31 /* On Linux amd64, this is 20 to 30 % faster than using a real 32 * comparison (which wouldn't work on Windows since it expects both 33 * negative and positive values), a ternary operator, or floats instead 34 * of doubles. */ 35 union { int32_t i; double d; } u; 36 u.d = *(double const *)i1 - *(double const *)i2; 37 return u.i; 32 38 } 33 39
Note: See TracChangeset
for help on using the changeset viewer.