in reply to Re^5: &1 is no faster than %2 when checking for oddness. (Careful what you benchmark)
in thread &1 is no faster than %2 when checking for oddness. Oh well.
I misunderstood your arcane way of doing floating point mathArcane? I've two time points, both given as a number of seconds and a number of microseconds since some point in time. Let the first timestamp be (S1, M1), the second (S2, M2). So, the difference is (S2 + M2 / 1000000) - (S1 + M1 / 1000000). Factoring out common code is good is always thought here, and it has the additional benefits of reducing the number of divisions needed, so using some primary school arithmetic, we get S2 - S1 + (M2 - M1) / 1000000.
Not arcane. Elementary.
I also noted "Without having analysed it too closely, you appear to have a precedence problem in your delta calculations.".If you are going to critic my posting publicly, I think I deserve the curtesy of you at least analysing some simple arithmetic a bit more closely.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: &1 is no faster than %2 when checking for oddness. (Careful what you benchmark)
by BrowserUk (Patriarch) on Nov 16, 2006 at 15:32 UTC | |
by Anonymous Monk on Nov 17, 2006 at 08:08 UTC |