DEV Community

Discussion on: Rust instead of Ruby: a case study

 
lluismf profile image
Lluís Josep Martínez • Edited

In your particular case, using less memory performs better (I don't doubt it) but in general this is not true. For instance take any DBMS, if you give it not enough memory it will perform worse because the cache hits will be low (ideally it should be near 100%). Give it a lot of memory and it will fly because most of the pages will be retrieved from cache instead of disk.

ps: I don't know Ruby or Rust.

Thread Thread
 
rhymes profile image
rhymes

I understand your point but I think we are talking about two different things :)

Obviously if you restrict the available memory of a piece of code it's going to perform worse, because as you said it is not enough.