Skip to content

Instantly share code, notes, and snippets.

@aaronlidman
Created April 13, 2013 18:20
Show Gist options
  • Select an option

  • Save aaronlidman/5379483 to your computer and use it in GitHub Desktop.

Select an option

Save aaronlidman/5379483 to your computer and use it in GitHub Desktop.
Figuring out why my parser is so slow. 3.3M items
Time, RAM (mb)
Count only
00:22.57
365.82
'|'.join(map(str, (lon, lat)))
00:27.99
365.78
'|'.join(map(str, (round(lon, 6), round(lat, 6))))
00:42.27
365.83
'|'.join(map(str, (lon, lat))) -> leveldb
00:39.68
953.01
'|'.join(map(str, (round(lon, 6), round(lat, 6)))) -> leveldb
01:11.80
811.57
I guess I won't be using round.
What is leveldb doing with all that RAM? I though cache was limited to ~4mb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment