4 ms·
Yes, I am currently writing a masters thesis about it! It is a "research language that [is] currently under heavy development" as the README says so I don't rec
by anfelor 5y ago
Yes, I am currently writing a masters thesis about it! It is a "research language that [is] currently under heavy development" as the README says so I don't recommend using it for anything other than a research/toy project. But you would be surprised how well it works: Algebraic effects can give you 98% the power of monads while being much faster and easier to understand. And then Koka uses mimalloc [0], Perceus [1] and tail recursion modulo cons which make Koka programs almost as fast as C++. For example, in the benchmarksgame, Haskell takes 5x as much time on the binarytrees benchmark as the fastest implementation, while Koka is 50% slower (similar to other C/C++ and Rust implementations).
[0]: https://github.com/microsoft/mimalloc https://github.com/microsoft/mimalloc
[1]: https://news.ycombinator.com/item?id=25464354 https://news.ycombinator.com/item?id=25464354
- igouy 5y ago> Haskell takes 5x as much time … as the fastest implementation, while Koka is 50% slower (similar to other C/C++ and Rust implementations). Which is to say Koka takes 2x as much time as the fastest for that task ?
- grumpyprole 5y agoThat's pretty good considering Koka is a high-level language like Python and JavaScript.
- 6gvONxR4sf7o 5y agoHuh, now I'm curious whether it means 2x or 1.5x. These graphs on the github look promising https://github.com/koka-lang/koka/blob/master/doc/bench-amd3600-nov-2020.png https://github.com/koka-lang/koka/blob/master/doc/bench-amd3...