Thank you Josh, that is representative enough. In my system the
speedup of structured arrays is ~30x. A copy of the whole array is
still ~6x faster.

-á.


On Thu, Jun 28, 2012 at 10:13 PM, Josh Ayers <josh.ay...@gmail.com> wrote:
> import time
> import numpy as np
>
> dtype = np.format_parser(['i4', 'i4'], [], [])
> N = 100000
> rec = np.recarray((N, ), dtype=dtype)
> struc = np.zeros((N, ), dtype=dtype)
>
> t1 = time.clock()
> for row in rec:
>     pass
> print time.clock() - t1
>
> t1 = time.clock()
> for row in struc:
>     pass
> print time.clock() - t1

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to