Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why Does Julia Work So Well? (ucidatascienceinitiative.github.io)
3 points by leephillips 9 months ago | hide | past | favorite | 3 comments


This is a good summary of the power of Julia's type system in performance. The `2^-5` seems like a bad example, tho, because it renders as a float. Every version of Julia I can run also allows it to work. I assume this used to error?


Yeah, the article is slightly out of date. There is no error in Julia 1.11 and 1.10. I no longer have earlier versions installed, so I don’t know when this changed.


This changed with v1.0 with the introduction of literal_pow and the interprocedural optimizations necessary so that compile-time constants (literal numbers) could optimize this case and determine the alternative type. Yeah this was written almost 10 years ago so it may need a little bit of love.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: