Skip to main content

Timeline for Vowels up, consonants down

Current License: CC BY-SA 4.0

8 events
when toggle format what by license comment
Mar 23, 2020 at 17:37 comment added Arnauld @S.S.Anne Yes, you are absolutely right: for n==1|n==5|n==7|n==13, it will test the bitmask 0x20a2 (C to machine code) provided that the code is compiled with at least -O1.
Mar 23, 2020 at 14:04 comment added S.S. Anne GCC actually generates these for long strings of comparisons. Of course, they're in machine code, but still.
Mar 23, 2020 at 11:27 comment added Arnauld @Neil Nice find!
Mar 23, 2020 at 11:26 history edited Arnauld CC BY-SA 4.0
added a clang version
Mar 23, 2020 at 11:13 comment added Neil GCC is too clever, but if you switch to clang then you can (currently) get away with incrementing the pointer in the assignment statement thus saving a byte.
Mar 22, 2020 at 20:34 comment added Arnauld @S.S.Anne Yes, exactly. (I've just added an explanation to my JS answer.)
Mar 22, 2020 at 20:22 comment added S.S. Anne Ah, this is a binary lookup table of ASCII characters mod 32. Smart.
Mar 22, 2020 at 19:40 history answered Arnauld CC BY-SA 4.0