[Numpy-discussion] extracting a random subset of a vector
curzio.basso at unibas.ch
Thu Sep 2 02:16:29 EDT 2004
Chris Barker wrote:
>> and from the hotshot output is looks like it's the indexing, not the
>> permutation, which takes time.
> not from my tests:
a question about the method: isn't a bit risky to use the clock() for
timing the performance? The usual argument is that CPU allocates time
for different processes, and the allocation could vary. That's why I
used the profiler.
Anyway, I performed another test with the profiler, on the example you
also used, and I also obtained that most of the time is spent in
permutation() (2.264 over 2.273 secs).
More information about the NumPy-Discussion