0:00
0:34
0:34

Which Programming Languages Are the Fastest? | 1 Billion Loops: Which Language Wins?

Education

Ever wonder how quickly different programming languages can handle massive workloads? We tested one billion nested loops to find out. Zig, Rust, and C blazed through in about half a second—lightning fast! Fortran, Odin, and Dart followed closely, while Java, Kotlin, and C# landed comfortably in the middle. But when we got to Python, Ruby, and R, it took a few seconds—or even more. The difference? Compiled languages excel at raw speed, while interpreted ones trade some performance for flexibility and ease of use. Which would you pick? #coding #programming #learning #jobs #classess

ADVERTISEMENT

Comments 100

Sign in to join the conversation

Sign in
caitlin_macdonald
caitlin_macdonald 1 week, 6 days ago

I don't think this is a good example, because in FP languages you don't have iterations, but recursions which are always slower, but, still very impressive speed of elixir even in that case

gerolfechoing17
gerolfechoing17 2 weeks ago

perl? recuerdo que aun tenia un record de hacer "algo" sin colapsar

R
rodrigo.mendes 2 weeks, 5 days ago

Where is assembler ?

G
georgesnight77 1 month ago

In the mid-1980s when I was in college and studying programming, Pascal looked good, but Modula-2 was coming, and Turbo Pascal was an incremental compiler -- quick. OOP was just after I graduated, so I had to learn again. C++ was the crap that came next and dominated. So, to challenge it there were interpreters like Ruby and Python. Finally, recently we got something better. We got Scala in the test lab which mixed procedural, OOP and Functional. In the "real world" we got some others, including RUST. It's compiled, memory safe, type safe, and doesn't look too weird.

J
jenniferfoley328 1 month, 1 week ago

lua isnt even in the ~45s execution speed,instead it will be around a nanosecond for Lua 5.5

K
kamilly_sousa 1 month, 3 weeks ago

Assembler missing

M
maytemarroquín719 2 months, 1 week ago

Nobody uses it and nobody in the programming world knows about it but nim is sooooo underrated

R
reecehopkins473 3 months, 2 weeks ago

Proven that the benchmark had a flaw so Fortran showed much higher than it was suppose to due to the way it compiles which created a wrong intent

M
martinemarion431 3 months, 2 weeks ago

why the hell there is go at the end

diego_almeida
diego_almeida 3 months, 3 weeks ago

Depends on the application. Language speed is usually not a requirement for most apps. Bottleneck is usually database

zinalsood865
zinalsood865 3 months, 4 weeks ago

I am surprised how performant is Dart 😮

gerolfechoing17
gerolfechoing17 4 months ago

Don't choose based on that, choose based on what you are doing, each programming language has an area it works best at, that why Python is slow here, Python will exceed the others in another area

A
allenanderson404 4 months ago

Lua depends on what implementation you're using.

maríaluisa_lemus
maríaluisa_lemus 4 months, 2 weeks ago

"Talk is cheap, show me the code" ~ Linus Torvalds

J
juliapope595 4 months, 3 weeks ago

Nim ( all rounder language )

R
rodrigo.mendes 5 months, 1 week ago

See the difference: From zig to java: 0,04s From java to python: 31s

D
daniel_garcia 5 months, 1 week ago

How is c not the 🔝

keith.mitchell
keith.mitchell 5 months, 1 week ago

OpenCL and Chapel are the best languages if you have any serious parallelism in your hardware.

G
genaro.chavarría 5 months, 2 weeks ago

I've learned C++ in the mid 90's and I tried Python last year and I don't see the ''convinience'' of starting all over with Python.

luisquesada524
luisquesada524 5 months, 2 weeks ago

Where is Haskell?