strawlab/python-pcl — pull request #7 by colincsl (2013-05-06 22:13:51+00:00)
Title: Faster array/list IO

It's much faster to import/export data using numpy arrays than to use lists. Arrays can now be returned ~400x faster than before.

--Example speed test--
import numpy as np
import pcl
p = pcl.PointCloud()
x = np.random.randint(0,1000,[100000,3])
p.from_array(x.astype(np.float32))
%timeit p.to_array()
%timeit p.to_list()

-- Comparison of old to_array() function versus the new version --
Before: 525ms
Now: 1.25 ms