Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manually extract out a separate noinline _throw_not_readable function. Addresses JuliaLang#28481 (comment). Benchmark scenario: ```julia using BenchmarkTools, Random const N = 1000 @Btime read(buf, Float64) evals = N setup = begin rng = MersenneTwister(1) writebuf = IOBuffer() map(1 : N) do _ write(writebuf, rand(rng, Float64)) end buf = IOBuffer(take!(writebuf)) end ``` Benchmark results (CPU: Intel(R) Core(TM) i7-6950X CPU @ 3.00GHz): * Before: 2.533 ns (0 allocations: 0 bytes) * After: 1.775 ns (0 allocations: 0 bytes) Performance is now much closer to, but still not quite at the level of FastIOBuffers.FastReadBuffer (1.555 ns (0 allocations: 0 bytes)).
- Loading branch information