-
Committer:
John Arbash Meinel
-
Date:
2007-05-07 22:11:17 UTC
-
mto:
This revision was merged to the branch mainline in
revision
2643.
-
Revision ID:
john@arbash-meinel.com-20070507221117-l6pjpggfs9p2dtwy
Changing Reader.get_next_str (which returns a Python String)
into a c function saves a lot of time.
Specifically it avoids a GetAttr call, and a PyObject_CallObject
This drops the times down to:
...test__read_dirblocks_20k_tree_0_parents_c OK 122ms/ 2561ms
...test__read_dirblocks_20k_tree_0_parents_py OK 235ms/ 2606ms
...test__read_dirblocks_20k_tree_1_parent_c OK 175ms/ 2797ms
...test__read_dirblocks_20k_tree_1_parent_py OK 358ms/ 3014ms
...test__read_dirblocks_20k_tree_2_parents_c OK 259ms/ 2992ms
...test__read_dirblocks_20k_tree_2_parents_py OK 498ms/ 3232ms
We are close to being 2x faster than the python implementation.