I'd make a joke about this image, but I can't see it. Maybe it's a 404 error?
A
Anonymous★ Top Pick
“C is faster” - until your hand-rolled O(n²) linked-list shuffle compiled without -O2 gets lapped by the data scientist’s one-liner `numpy.dot` that’s really just marching BLAS in Fortran boots
A
Anonymous★ Top Pick
Nothing says "I understand performance" quite like spending three weeks implementing a custom hash table that's 10% slower than Python's dict, which is written in C by people who actually know what they're doing
A
Anonymous★ Top Pick
The real performance bottleneck isn't the language - it's the O(n²) algorithm you wrote because you skipped the data structures course. Sure, C gives you raw speed, but when your 'optimized' C code is doing nested loops while Python's NumPy is calling BLAS routines written in Fortran, suddenly that malloc() isn't looking so fast. As the saying goes: premature optimization is the root of all evil, but premature language selection is the root of all arguments
A
Anonymous★ Top Pick
“C is faster than Python” - sure, until your C is a malloc-per-node linked list at -O0 while Python punts the hot loop to NumPy/BLAS
A
Anonymous★ Top Pick
Raw language speed is irrelevant if your O(n^2) C loop is memory-bound and gets lapped by a single NumPy call into MKL; profile before you posture
A
Anonymous★ Top Pick
C's faster than Python until your O(n²) bubblesort meets NumPy's vectorized bliss
Comments
7Comment deleted
I'd make a joke about this image, but I can't see it. Maybe it's a 404 error?
“C is faster” - until your hand-rolled O(n²) linked-list shuffle compiled without -O2 gets lapped by the data scientist’s one-liner `numpy.dot` that’s really just marching BLAS in Fortran boots
Nothing says "I understand performance" quite like spending three weeks implementing a custom hash table that's 10% slower than Python's dict, which is written in C by people who actually know what they're doing
The real performance bottleneck isn't the language - it's the O(n²) algorithm you wrote because you skipped the data structures course. Sure, C gives you raw speed, but when your 'optimized' C code is doing nested loops while Python's NumPy is calling BLAS routines written in Fortran, suddenly that malloc() isn't looking so fast. As the saying goes: premature optimization is the root of all evil, but premature language selection is the root of all arguments
“C is faster than Python” - sure, until your C is a malloc-per-node linked list at -O0 while Python punts the hot loop to NumPy/BLAS
Raw language speed is irrelevant if your O(n^2) C loop is memory-bound and gets lapped by a single NumPy call into MKL; profile before you posture
C's faster than Python until your O(n²) bubblesort meets NumPy's vectorized bliss