3 ms·
The original is 1,287 bytes after removing comments and line endings where possible. After just a bit of search-and-replace to shrink variable names, I got the
by sp332 7y ago
The original is 1,287 bytes after removing comments and line endings where possible. After just a bit of search-and-replace to shrink variable names, I got the new one down to 2,373 bytes including the same error checking and output at the end. So 1.8 business cards, which is not too bad.
And no I haven't tried to compile it. https://pastebin.com/LDRd6U4e https://pastebin.com/LDRd6U4e
- a1369209993 7y agoHmm, some further improvements: typedef float F;typedef int I; // saves 2 lines (but zero bytes) #define R return // OR #define O(S,A,R) operator S(A){return R;} #define E(F){E_((F||cudaPeekAtLastError)(),__FILE__,__LINE__);} and so on - although you'd probably have to make semantic chages to get onto a single card. (Or use a smaller font, but that's presumably cheating.)
- sp332 7y agoI feel like the self-timing and error-checking is unnecessary, and you can at least fit it on the front + back of a business card with enough room left for your name and an email address.