3 ms·
While I'm definitely not suggesting we replace Curl with a rewrite in Rust (since the current Curl has had decades of good testing and auditing done on it), I a
by tombert 10y ago
While I'm definitely not suggesting we replace Curl with a rewrite in Rust (since the current Curl has had decades of good testing and auditing done on it), I am actually very curious how a rewrite in a safer language like Rust, OCaml, Haskell, or Go would fair in comparison in regards to performance and whatnot.
If I were ambitious enough, I'd do it myself in Haskell, but I think it'd be too much work for a simpler curiosity.
- notriddle 10y agoThere's hyper, if you want something that exists now, but it only does HTTP.
- fiedzia 10y agoMost likely I/O will take more time than whatever code is running, so in that aspect it would make no difference. Memory overhead is main concern here. Rust doesn't use GC, so you'll have full control and there should be not much difference in that aspect. Other languages do, which means more sophisticated runtime, less control and more overhead (or writing ugly code to avoid it). Libcurl written in Go/Ocaml/Haskell would require anyone using it to also include runtime of the language, which is usually rather large.