# Now, you could do something like the below instead, and it works
# fine and is more direct... except that for no clear reason, it
# is extremely slow and much more memory hungry. In particular,
# despite using identical format and options, it is somewhere
# around 40-80 times slower than this function, and uses somewhere
# around 2-6 times as much memory.
#
# I have no explanation whatsoever for this.