btwael / superstring.py

A fast and memory-optimized string library for heavy-text manipulation in Python
MIT License
250 stars 11 forks source link

Add the performance test to the repo #5

Closed thisfred closed 4 years ago

thisfred commented 4 years ago

Can you show the code that produced the hard coded numbers in the jupyter notebook?

btwael commented 4 years ago

Check it https://github.com/btwael/superstring.py/blob/master/bench.py, there are two functions test_superstring() and test_string().

thisfred commented 4 years ago

Yeah, but they don't show how you measured memory consumption or speed.

btwael commented 4 years ago

I did that manually using XCode Instruments, feel free if you have any suggestion or alternative to perform the comparison of speed and memory consumption

thisfred commented 4 years ago

https://pypi.org/project/memory-profiler/ https://docs.python.org/3/library/profile.html