Not very impressed with those Lisp benchmarks that I examined.
Which programming language or compiler is faster
41–50 of 90 posts
Re: Which programming language or compiler is faster
#42Can anyone explain why C++ beats out C so clearly?
C++ is just a stricter C - if you write proper C, it will be a correct C++ program, therefore it would run at the same speed. There's no way C can be other than marginally faster than C++ - if you write C and compile it with a C++ compiler. Then you have various optimizations that come from things like templates, constexpr. Look at the qsort method - to have a modicum of genericity you need to pass a function that wi…
In theory `restrict` (to disallow pointer aliasing like in Fortran) could lead to optimization gains, same as not having exceptions (the possibility of exceptions prohibits certain optimizations of the C++ compiler).
Re: Which programming language or compiler is faster
#43Earlier quoted context omitted.
Do you have an example for minutes of compile time for a single line? Especially since 1.6 (march 2021), I haven't run into that (and I'm using Julia pretty much full-time).
So the compile times gotten better, but still are quite slow in comparison?
Re: Which programming language or compiler is faster
#44I wonder where FPC stands. Original Pascal implementations were single pass and I've had Mloc delphi projects build in seconds.
Re: Which programming language or compiler is faster
#45Julia always seems to rank #1 or close to it when compared to other interpreted languages but I only ever see it used for research and math. Why doesn’t anyone use it for anything else?
- immature web/network services stack. For better or worse the lang seemed to focus on more number crunching throughput early than reliable distributed data processing, but the latter is a much larger market and what most enterprises care about.
It's the difference between a lang only having Matlab or R ceiling vs python-like ceiling.
- poor static compilation or static analysis story. this is what a lot of people needing to put code in production need.
It's also standard expectation now with a lot of dynamic language code (python or js) that aims to be in production.
- for certain types of realtime uses, more direct control of memory is doable, but you have to jump through hoops. Again, determinism is very important.
- historically, compile times were quite horrid. part of this was llvm, part of it was julia. It's gotten way better in 1.6 and 1.7, but compilation results need to be cached more than just precompilation.
however, all being said, I love the lang! There is a lot going for it especially how the package ecosystem works. There is also a lot of innovative projects.
Re: Which programming language or compiler is faster
#46Re: Which programming language or compiler is faster
#47Earlier quoted context omitted.
Do you have an example for minutes of compile time for a single line? Especially since 1.6 (march 2021), I haven't run into that (and I'm using Julia pretty much full-time).
So the compile times gotten better, but still are quite slow in comparison?
1) llvm itself getting dramatically slower over time, before more focus upstream on compiler speed more recently: https://www.npopov.com/2020/05/10/Make-LLVM-fast-again.html
2) different types of invalidations
3) less than ideal precompilation of packages
I think all of it has been improved, and can certainly be improved further. That also includes improving the speed of its interpreter (vs the JIT), which exists but was never optimized for speed afaik.
Re: Which programming language or compiler is faster
#48What matters to me is incremental build time. Rarely do I compule a big program in its entirety from scratch. I don't use Unison but I would love to for this reason.
Re: Which programming language or compiler is faster
#49What does it even mean for a language to be faster?
Re: Which programming language or compiler is faster
#50Earlier quoted context omitted.
C++ is just a stricter C - if you write proper C, it will be a correct C++ program, therefore it would run at the same speed. There's no way C can be other than marginally faster than C++ - if you write C and compile it with a C++ compiler. Then you have various optimizations that come from things like templates, constexpr. Look at the qsort method - to have a modicum of genericity you need to pass a function that wi…
> There's no way C can be other than marginally faster than C++ In theory `restrict` (to disallow pointer aliasing like in Fortran) could lead to optimization gains, same as not having exceptions (the possibility of exceptions prohibits certain optimizations of the C++ compiler).