In my previous optimistic outburst I asserted that “Even a language like Ruby, which tends to hang near the bottom of any performance-oriented benchmark, is thousands of times faster than BASICs that people were learning to program 8-bit home computers with in the 1980s.” That was based on some timings I did five years ago, so I decided to revisit them.
The benchmark I used is the old and not-very-good-as-a-benchmark Sieve of Eratosthenes, because that’s the only benchmark that I have numbers for in Atari BASIC on original 8-bit computer hardware. Rather than using Ruby as the modern-day language, I’m using Python, simply because I already have it installed. It’s a fair swap, as Python doesn’t have a reputation for performance either.
The sieve in Atari BASIC, using timings from an article written in 1984 by Brian Moriarty, clocks in at:
324 seconds (or just under 5 and a half minutes)
The Python version, running on hardware that’s a generation back—no i7 processor or anything like that—completes in:
Now that’s impressive! A straight-ahead interpreted language, one with garbage collection and dynamic typing and memory allocation all over the place, and it’s still two orders of magnitude, 108 times, faster than what hobbyist programmers had to work with twenty-five years ago. But what about the “thousands of times” figure I tossed about in the first paragraph?
Oh, yes, I forgot to mention that the Python code is running the full Sieve algorithm one thousand times.
If the Atari BASIC program ran a thousand times, it would finish after 324,000 seconds or 5400 minutes or almost four days. That means the Python version is—get ready for this—108,000 times faster than the Atari BASIC code.
(If you liked this, you might also like A Spellchecker Used to be a Major Feat of Software Engineering.)
Categories: Blogs Programming in the 21st Century
Erlang on Twitter
» SophieLambrakis (Sophie Lambrakis): RT @Robin_B: Behind the scenes of a multi-agent interactive drama game, by Richard Evans. Super-interesting use of erlang and exclusion log…
RT @Robin_B: Behind the scenes of a multi-agent interactive drama game, by Richard Evans. Super-interesting use of erlang and exclusion log…
» erlnews (Erlang news): Stumbling Into the Cold Expanse of Real Programming http://t.co/yXVpndZHkB #erlang
Stumbling Into the Cold Expanse of Real Programming http://t.co/yXVpndZHkB #erlang
» common_disease (смерть автора): @ungzd Erlang-то возьми
@ungzd Erlang-то возьми
» erlnews (Erlang news): Strange thing about mongodb-erlang driver when using replica set #erlang http://t.co/19ZamtgrPI
Strange thing about mongodb-erlang driver when using replica set #erlang http://t.co/19ZamtgrPI
» jboursiquot (Johnny Boursiquot): In order to “get” Erlang, I’m spending some time with Prolog first. But damn this stuff is weird (for the moment) #MindExpansionJutsu
In order to “get” Erlang, I’m spending some time with Prolog first. But damn this stuff is weird (for the moment) #MindExpansionJutsu
» immobilo_erlang (Wohnung Erlangen): Gut geschnittene 2-Zimmer-Wohnung mit 2 Balkonen im Erlanger Westen: 450,00 € / Miete
2 Zimmer, 62 m²
91056 Er… http://t.co/t3PPiCOwCQ
Gut geschnittene 2-Zimmer-Wohnung mit 2 Balkonen im Erlanger Westen: 450,00 € / Miete
Number of aggregated posts: 10649
Most recent article: May 19, 2013
» Moraru on This is Why You Spent All that Time Learning to Program: It is true that computer science was a pain in the back at time that i’ve had to learn it…
» Commercial hand dryers on Couchbase Meetup at new HQ: Buy online from here where you will get so much of variety in Commercial hand dryers for people. If you…
» Fort McMurray Homes on Motivated Reasoning and Erlang vs Python vs Node: I don’t really understand why this post is motivational? I don’t even see a post, just a title. Fort McMurray…