4 ms·
The short answer is Innate parallelism at a far higher degree than most languages. The longer answer is pure functions applied to immutable objects (or objects
by myrryr 4y ago
The short answer is Innate parallelism at a far higher degree than most languages.
The longer answer is pure functions applied to immutable objects (or objects held in a transition) can be applied in parallel.
The language is designed in a way to give you that, in a way where it is by default rather than in special cases.
The second part is, it being at a mid point between lazy and not - things will be evaluated as there is processor to do so. So things which can be delayed will be, but if something can be done now, for later, it will be.
The combo of this means you can handle more interactions with entities per second, using the cores available.
- threeseed 4y ago> pure functions applied to immutable objects (or objects held in a transition) can be applied in parallel I have been writing code like this every day using Scala for years. With frameworks like ZIO (zio.dev) making this trivial to do. None of which is faster than if I had wrote that code imperatively using say Java. It is definitely easier and safer to write. But performance is about far more than just optimised threading constructs on top of immutable data structures.