I’ve now moved my coding blog permanently (or so I hope) to codeblog.jonskeet.uk. Please go there for new posts – and all my old content is there too, of course. I’m disabling comments on this blog, and will add a conspicuous banner too.
Introduction Recently I’ve been optimizing the heck out of Noda Time. Most of the time this has been a case of the normal measurement, find bottlenecks, carefully analyse them, lather, rinse, repeat. Yesterday I had a hunch about a particular cost, and decided to experiment… leading to a surprising optimization. Noda Time’s core types are mostly value types – date/time values are naturally value types, just as DateTime and DateTimeOffset are in the BCL. Noda Time’s types are a bit bigger than most value types, however – the largest being ZonedDateTime, weighing in at 40 bytes in an x64 CLR … Continue reading Micro-optimization: the surprising inefficiency of readonly fields