On Wed, Sep 30, 2009 at 1:54 PM, Christopher Barker
<[email protected]> wrote:
>
>
> Brent Pedersen wrote:
>>>> timing on my machine, that gives:
>>>>
>>>> vector append 1.19197511673
>>>> python append 6.57795596123
>>>> vector get 0.080246925354
>>>> python get 2.01052689552
>
> While you're at it, why not give an array.array implementation a try --
> it might be closer to the C++ version -- it should be!
>
> -Chris


looks like it could actually be faster.

http://gist.github.com/198576

gives:

method: append/get
python: 3.5361 / 1.8621
vector: 1.8887 / 0.5865
array : 0.3319 / 0.1467

think that's a reasonably fair test except i cheated for array.array
on the inserts by doing a resize() and then inserting, not appending.
otherwise, it's _very_ slow to do the array.append() -- over 30
seconds instead of .33
for array.array, i used the stuff attached to this ticket:
http://trac.cython.org/cython_trac/ticket/314




>
>
>
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> [email protected]
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to