if you're curious, literally just replaced a "".join(four ternary if-else statements with a for-loop comprehension) with a repr(...)[12:-2].replace(r"\x00",r"\000")
if you don't speak pythonese, that's just a built-in function to get the string representation of an object, so repr("hello\n") returns "'hello\\n'", then the [] is a slice operator so i shave off the prefix and suffix, then the replace just makes sure that \x00 doesn't bleed into next letters if the next word starts with abcdef or something,
no i don't think you read it correctly. half a millisecond. and while it does scale linearly, it's for an embedded machine so you'd quicker run out of memory than my contribution would ever be noticeable
78
u/pyropuschel 1d ago
Is this like "the tests now run a lot faster" because they are broken/deleted?