|
|
Subscribe / Log in / New account

looks like Haskell

looks like Haskell

Posted Apr 24, 2013 20:36 UTC (Wed) by Tuna-Fish (guest, #61751)
In reply to: looks like Haskell by k8to
Parent article: A taste of Rust

There are many different kinds of speed. OCaml is very fast in *throughput*, but the differences in memory management strategies guarantee that Rust should always be able to promise less worst-case latency. In fact, Rust seems to sacrifice quite a bit of throughput to provide those better latency guarantees (among other things, the language promotes copying in many places where OCaml would be fine sharing), so I would expect OCaml to win most throughput benchmarks. However, if what you want is to guarantee that no task can take longer than 8ms to complete (fe. you want smooth 120Hz frame rates in a game), Rust should be better.

It's a tradeoff. Fundamentally, if a language or system wants to be really good on one metric, it has to sacrifice some of the other. OCaml and Rust choose different points, and there is nothing wrong with the choice of either. However, this does mean that there are some tasks where Rust is better suited.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds