Hi list,
I am trying to do a simple comparison of various I/O libraries to save a
bunch of numpy arrays. I don't have time to actually invest in PyTables
now, but it has always been on my radar. I wanted to get a ball-park
estimate of what was achievable with PyTables in terms of read/write
performance. I wrote a quick pair of read and write functions, and I am
getting really bad performance.
Obviously, I should invest in learning PyTables, but right now I am just
trying to get figures to justify such an investement. Can somebody have a
look at the following code to see if I haven't forgotten something
obvious that would make I/O faster. Sorry, I feel like I am asking you to
do my work, but I hate it that Pytabls is coming out so bad on the
benchs:
def write_hdf(arrays):
h5file = tables.openFile("out/test.h5",
mode = "w", title = "Test file")
for index, array in enumerate(arrays):
h5file.createArray(h5file.root, 'array%i' % index,
array)
h5file.close()
def read_hdf():
h5file = tables.openFile("out/test.h5", "r")
out = list()
for node in h5file.iterNodes(h5file.root):
out.append(node.read())
h5file.close()
return out
Thanks a lot,
Gaƫl
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users