Slow deserialization of booleans

I stand corrected again, and it jogged my memory about something I learned just last week. Improving inference to Array{Bool} and any optimizations from knowing the only setindex! method does not eliminate the runtime dispatch, and that contributes allocations by boxing unboxed inputs or outputs, even when similar techniques improved type inference all the way to concrete types. Your code is actually doing fewer allocations than I’d expect, but I’m still terrible at predicting dispatch boxing. To save a click of the link, it’s hypothetically possible for runtime dispatch to not do that, but that’s not how it’s implemented right now and would require a significant change to Core Julia and the GC.