Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change IOBuffer to use Memory internally #53192

Merged
merged 1 commit into from
Feb 13, 2024
Merged

change IOBuffer to use Memory internally #53192

merged 1 commit into from
Feb 13, 2024

Commits on Feb 13, 2024

  1. change IOBuffer to use Memory internally

    An Array is often still allocated on output, but this gives the compiler
    a chance to potentially elide that in certain cases.
    
    For measurement, it seems about 10% faster as a string builder:
    
    julia> @Btime repr("hello\nworld"^10);
      1.096 μs (10 allocations: 640 bytes) # master
      973.000 ns (9 allocations: 608 bytes) # PR
      994.000 ns (8 allocations: 576 bytes) # also PR, after Revise-ing Base.wrap
    vtjnash committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    e6d028d View commit details
    Browse the repository at this point in the history