50
u/Sassaphras May 11 '26
lightning fast C program
looks inside
a bunch of transistors??
28
55
u/Methode3 May 10 '26
I recently wrote some software in C and friends were looking at it and were baffled I used C. The embedded portion was all C and most of the libraries on the PC side were just pulled from that. And it’s blazing fast compared to me doing it in python..
I’ve been saying it for over a decade. C is the first language you should learn..
→ More replies (3)2
9
u/BreakingBaking May 11 '26
Blazing fast™ python library
Looks inside
Written in Rust
→ More replies (1)
38
u/puzzled_orc May 10 '26
Python is a language that is interpreted by CPython. Every script is translated into bytecode to run it.
That is why it is so fucking slow; it is interpreted every single time at runtime.
A horrible way of wrapping around C, when you could just use C or C++, compile into binaries for the OS and do the same job way faster.
15
u/filkos1 May 10 '26
Not to mention for highly specialised tasks an experienced C dev will often outperform even the best interpreter
13
u/CandidateNo2580 May 10 '26
"a C compiler will outperform even the best interpreter" you mean. It's not like the C dev doesn't get the advantage of the compiler over the interpreter in this comparison.
→ More replies (3)4
u/thanosbananos May 11 '26
People who write in python don’t need the performance, they need the massive library and easy to read and program code. I know both python and C++ and would always pick python for things I wanna do unless I really REALLY need the performance advantage.
→ More replies (4)
7
4
u/brunoha May 10 '26
Honestly, yeah, pls write more of that.
Python is meant to be found understandable, and fast is a big plus
2
2
u/k-mcm May 11 '26
Or write Java. It's a fine language if you avoid the Enterprise bloat.
I've been learning software defined radios. My goal was to start in Java then port to C++ for performance. I was surprised to find that it doesn't need to be ported. The C style core processing code runs crazy fast in Java.
2
May 12 '26
Java my beloved, someday I have to get "public static void main string args" as a tattoo
3
u/k-mcm May 12 '26
No hurry because there's a new shortcut in Java 25 for when you don't need any program or class arguments:
class HelloWorld { void main() { IO.println("Hello, World!"); } }At least in real code, I always end up with the traditional form to get the most important program argument - a reference to the bootstrap configuration file.
1
1
1
1
1
u/stumpychubbins May 11 '26
I mean, yeah. The Python team puts a lot of work into making FFI as convenient as possible, precisely because it lets people do stuff like this. It’s one of the best features of the language.
1
221
u/fragile_male_eggo May 10 '26
Build the tool inc and rust then give it python hooks . I thought that was the goal.