Python and C…Wow…
I’ve come to the realization that as nice as Python is, I really ought to learn a lower-level language. Even though I own two C++ books, I’m only reading them to a)Gain a rudimentary knowledge of the C++ syntax, such that I can hack it if I have to b)Improve my conceputal knowledge c)Well, they are interesting.
Instead, I’m learning C, because it just seems like more of my cup of tea. And kernel hacking might be fun
So one of the sample programs in the tutorial I’m using is that which will list all the numbers from 1-2500, and say if they’re prime or not. I faithfully wrote and compiled it in C, ran it, and WOW! that was fast. I could not detect any sort of delay, or processing or anything, it was just:
<Enter><A screenfull of numbers, ending in “2500 is not prime” appears>
I was so impressed by this, I converted the code to Python. I even removed a function that listed the version number and time compiled. When I ran it, I could see numbers whizzing by the screen for half a second or so, and then it was done.
I know it’s old news that compiled languages are faster than interpreted ones, and that low-level languages are faster than high-level ones, but it’s just impressive to tangibly see it.



















































[...] Back in November, I posted about how C was tangibly faster than Python. [...]