jieba-rs icon indicating copy to clipboard operation
jieba-rs copied to clipboard

Compare the memory footprint with cppjieba

Open MnO2 opened this issue 5 years ago • 1 comments

  • Using what tools to fairly calculate the memory usage?
  • Compare the executable binary size as well.

MnO2 avatar Jun 27 '19 09:06 MnO2

Tool on Mac: https://www.swiftdevjournal.com/measuring-your-apps-memory-usage-with-instruments/ Tool on Linux: http://www.brendangregg.com/FlameGraphs/memoryflamegraphs.html

MnO2 avatar Jun 30 '19 03:06 MnO2

Is there a real thing to compare here?

AFAICT, the only dynamic allocations are for the dictionary struct and then the hmm state struct. Most everything else seems stack-based, and O(k) where k = sentence length... I would be surprised if there was any real memory size diff that mattered...

awong-dev avatar Apr 13 '24 21:04 awong-dev