spion / hashtable-latencies

Latency of a web service that stores a large hashtable, in multiple languages
43 stars 8 forks source link

Memory usage of the languages? #12

Open chenglou opened 7 years ago

chenglou commented 7 years ago

@spion what were your conclusion on the memory usage of the languages beside OCaml? This'd be a good comparison point.

spion commented 7 years ago

Sorry, I forgot to update the README, but the reason why the OCaml version used so much RAM was a mistake in my code (I used an array of 1024 chars instead of a Buffer, which made the actual size of buffers in memory 8KB instead of 1KB).

After switching to Buffer memory usage was comparable with the other versions. I didn't do any strict measurements, but most were in the range 300MB-800MB

I'll update the readme to remove the memory concerns.

edit: done. Some concrete numbers about the memory usage observed are also available here: https://github.com/spion/hashtable-latencies/issues/9#issuecomment-223816311

sophiebits commented 7 years ago

300 MB and 800 MB still sound pretty different. :) Would be neat to see a comparison of all the alternatives if you ever revisit this.