Modern Fortran is no longer the FORTRAN from punch cards, having this compiler push maybe will help folks to write directly blazing performance Fortran code, instead of numerical code in Python.
> It utilizes a range of Modern Fortran features, including extensive use of optional variables, function pointer passing, and a randomized test driver, among others. Successfully compiling PRIMA requires a compiler with a robust and mature backend, as well as well-developed intermediate passes and a capable parser.
I am not getting a full picture here. What's challenging about PRIMA code base? Does it use some advanced features that are difficult for a compiler to support? Are the mentioned features in the 2008 standard?
What's actually impressive is that LFortran in alpha stage is only 2x slower than GFortran, which goes back decades.
It was a lot of corner cases that we had to get right, it's the most advanced code that LFortran can compile. I think none of the features individually is difficult to support, but there were a lot of them.
I'll have to benchmark a library-less Matmul with LFortran, to compare against flang, C, and python versions.
Roughly: 8, 12, 18 units of time, respectively. Python only being twice as slow for the simplest matmul - how much of that is merely the interpreter startup time?
pjmlp|11 months ago
Modern Fortran is no longer the FORTRAN from punch cards, having this compiler push maybe will help folks to write directly blazing performance Fortran code, instead of numerical code in Python.
anta40|11 months ago
yjftsjthsd-h|11 months ago
genphy1976|11 months ago
- Wikipedia: https://en.wikipedia.org/wiki/LFortran
- Homepage: https://lfortran.org
- GitHub: https://github.com/lfortran/lfortran
If you like to play with it, see
- LFortran in web browsers using WebAssembly: https://dev.lfortran.org
- LFortran in Compiler Explorer: https://godbolt.org/z/EfWvsY6Kh
andsoitis|11 months ago
froh|11 months ago
quanto|11 months ago
I am not getting a full picture here. What's challenging about PRIMA code base? Does it use some advanced features that are difficult for a compiler to support? Are the mentioned features in the 2008 standard?
What's actually impressive is that LFortran in alpha stage is only 2x slower than GFortran, which goes back decades.
certik|11 months ago
actinium226|11 months ago
ggraphilia|11 months ago
https://labs.quansight.org/blog/building-scipy-with-flang
which was once discussed on HN at
https://news.ycombinator.com/item?id=38196412
pklausler|11 months ago
ggraphilia|11 months ago
https://fortran-lang.discourse.group/t/lfortran-compiles-pri...
genphy1976|11 months ago
- Become a sponsor to LFortran: https://github.com/sponsors/lfortran
- Open Collective: https://opencollective.com/lfortran
- NumFOCUS: https://numfocus.org/donate-to-lfortran
ggraphilia|11 months ago
https://github.com/libprima/prima
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
genewitch|11 months ago
Roughly: 8, 12, 18 units of time, respectively. Python only being twice as slow for the simplest matmul - how much of that is merely the interpreter startup time?
fadreqrew|11 months ago
[deleted]
erwiue|11 months ago
[deleted]
fdfdsafa|11 months ago
[deleted]
rewqa|11 months ago
[deleted]