Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I am sure this had nothing to do with the Rust language itself. Perhaps 3 years ago I looked for XML libraries to rewrite confcheck in Rust. I tried 4 libraries and they were all horribly slow, and inconvenient to use. Perhaps, there are better libraries now?
In Haskell I could use a fast streaming library, and build a parser on top of it like that. It's a bit disgusting, but it's fast and kind of convenient :)
Immutable data structures don't necessarily require more memory: they can avoid deep copies. They are also automatically thread safe without expensive (slow) locking mechanisms. They also don't necessarily reduce cache locality. The reduced cache locality in the case of Haskell (I think) mainly comes from the representation of objects in its implementation (improved STG) which uses extensive boxing and jumps that hinder both spatial and temporal locality (require review/comment from GHC/Computer Architecture experts, take it with a grain of salt). Objects can be much more efficiently represented if not for the need to implement lazy (call-by-need) semantics. See sixten and futhark for examples.
Immutable data structures don't necessarily require more memory: they can avoid deep copies. They are also automatically thread safe without expensive (slow) locking mechanisms. They also don't necessarily reduce cache locality. The reduced cache locality in the case of Haskell (I think) mainly comes from the representation of objects in its implementation (improved STG) which uses extensive boxing and jumps that hinder both spatial and temporal locality (require review/comment from GHC/Computer Architecture experts, take it with a grain of salt). Objects can be much more efficiently represented if not for the need to implement lazy (call-by-need) semantics. See sixten and futhark for examples.
Related posts
- What downsides exist to Futhark? Seems almost too good to be true?
- GPU Programming: When, Why and How?
- Functional GPU programming: what are alternatives or generalizations of the idea of "number of cycles must be known at compile time"?
- The Futhark Programming Language: Functional Array Programming in CUDA
- Achieving High-Performance the Functional Way