3 ms·
There was a coding competition at a local podunk BBS back in ~’91. I figured I would use it as an excuse to learn some assembly. The goal of the challenge i e
by jcims 4y ago
There was a coding competition at a local podunk BBS back in ~’91. I figured I would use it as an excuse to learn some assembly. The goal of the challenge i entered was to find all of the prime numbers between one and a million. Of course my goal with the assembly approach was speed and executable size. In both of those I smoked the competition by 3 to 4 orders of magnitude.
But the scoring mechanism was heavily weighted towards lines of code and the turbo Pascal entry one even though it took about six minutes to complete.
That pissed me off so much I never really messed with assembly again.
- TylerE 4y agoWell, if LoC didn’t count you could just write a gigantic multi-megabyte print statement :)
- jcims 4y agoThat's thinking outside the box! xD
- TylerE 4y agoThese days you could use a language with compile-time macro execution like nim or D and have it both ways…
- throw34 4y agoOr maybe have the object code for the executable as one static constant and jump to it on the one and only line of the program: speed, size and one line of code (maybe two depending on how the counting is done)
- jamal-kumar 4y agoGet this, an old greybeard I worked with told me managers used to harsh on LoC at companies like IBM back in those days as a measure of productivity. Like people got fired over what you lost the contest on. Insane, I can see why that would tick you off