Live data from Hacker News

Which programming language or compiler is faster

programming-language-benchmarks.vercel.app

51–60 of 90 posts

Re: Which programming language or compiler is faster

#51
post #45

Julia 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?

These are what i'd say, as someone who has tinkered with it a lot but uses python/C++ for $day_job: - 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 pyth…

> poor static compilation or static analysis

You're comparing it with python.

Re: Which programming language or compiler is faster

#52
post #49

What does it even mean for a language to be faster?

Not sure how technically accurate it is, but "language" usually implies more than just the syntax. I hear and say things like "compiled language", "interpreted language", "language VM", "garbage collected language", "dynamically typed language" and so on. Those things all say something about development speed and runtime speed.

The phrases "compiled language" and "interpreted language", despite their widespread use, are not particularly sound concepts. There are plenty of languages that have both compilers and interpreters.

Re: Which programming language or compiler is faster

#53
post #29

Julia 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?

Julia is incredibly slow to compile. Far worse than C++ last time I tried. For interactive notebooks, I found it’s common to have a single line take a couple minutes to compile - it’s simply not interactive in the way Python is, despite having good runtime performance once compiled. The deal breaker for me is that its compiler is JIT based whether you want it or not. Code will hang at runtime for multiple minutes as…

This is total misinformation, sorry. Julia may, depending on your setup, be slow to initially load, but the compiler is quite fast generally.

Also, there's a solution to precompile binaries with no JIT penalty...

https://github.com/JuliaLang/PackageCompiler.jl

Enjoy!

Re: Which programming language or compiler is faster

#55
post #51
post #45

Earlier quoted context omitted.

These are what i'd say, as someone who has tinkered with it a lot but uses python/C++ for $day_job: - 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 pyth…

> poor static compilation or static analysis You're comparing it with python.

yes, and python has a large amount of analyzers:

https://github.com/typeddjango/awesome-python-typing

https://github.com/ethanhs/python-typecheckers

though i'd say they are worse than similar tooling in typescript/javascript.

julia's tooling is relatively nascent.

Re: Which programming language or compiler is faster

#57
post #55
post #51

Earlier quoted context omitted.

> poor static compilation or static analysis You're comparing it with python.

yes, and python has a large amount of analyzers: https://github.com/typeddjango/awesome-python-typing https://github.com/ethanhs/python-typecheckers though i'd say they are worse than similar tooling in typescript/javascript. julia's tooling is relatively nascent.

Julia has @code_warntype for type checking and Jet.jl for static analysis (and snoopcompile/cthulu for the really advanced stuff). Is there anything those are missing?

Re: Which programming language or compiler is faster

#58

What makes zig so memory efficient?

Manual memory management a la C, and easy access to custom allocation (arenas, etc) that usually aren't used in most C code (and C doesn't offer as allocators by default).

Add compile time processing which can get pretty far into reducing all kinds of otherwise runtime ops...

Re: Which programming language or compiler is faster

#59

What does it even mean for a language to be faster?

A lot. Semantics that can be made fast (e.g. C vs Python) with little effort.

(Some languages with bad semantics for that might still get fast, but the language itself isn't designed to help that. JS for example was made fast, but with tons of effort but with tons of money and man-centuries thrown in by Google, Apple, Mozilla, MS, not the kind of recources available to most languages. So, I'd call a language whose semantics afford optimization a fast language).

Runtime complexity (e.g. "zero overhead" vs "lotsa overhead" features).

Also, I find the "language vs compiler" dicthotomy pedantic and tedious. For most languages and most use cases, there's a single dominant canonical version, e.g. CPython, Matz's Ruby, Oracle's Java.

Just because there are niche other implementations all 10 people use doesn't change the fact that 90% of users will be on the canonical implementation, and for them, THAT's synonymous with the language, not just some abstract spec.

Post reply on HN