Numpy slow at vector cross product?

eryk sun eryksun at gmail.com
Tue Nov 22 08:42:55 EST 2016


On Tue, Nov 22, 2016 at 1:06 PM, BartC <bc at freeuk.com> wrote:
>> In this specific example, the OP is comparing two radically different
>> pieces of code that clearly and obviously perform differently. He's doing
>> the equivalent of timing the code with his heartbeat, and getting 50 beats
>> for one and 150 beats for the other. That's good enough to show gross
>> differences in performance.
>
> No, he's using time.clock() with, presumably, a consistent number of ticks
> per second.

Note that some people in this discussion use Unix systems, on which
using time.clock for wall-clock timing is completely wrong. Please use
timeit.default_timer to ensure that examples are portable.



More information about the Python-list mailing list