Skip to content

Commit

Permalink
Pre-allocate Dragonbox cache array (crystal-lang#13649)
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil authored and Blacksmoke16 committed Dec 11, 2023
1 parent 3c4039d commit d9da302
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/float/printer/dragonbox_cache.cr
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ module Float::Printer::Dragonbox
end

CACHE = begin
cache = [] of WUInt::UInt128
cache = Array(WUInt::UInt128).new(619)
put(cache, 0xff77b1fcbebcdc4f_u64, 0x25e8e89c13bb0f7b_u64)
put(cache, 0x9faacf3df73609b1_u64, 0x77b191618c54e9ad_u64)
put(cache, 0xc795830d75038c1d_u64, 0xd59df5b9ef6a2418_u64)
Expand Down

0 comments on commit d9da302

Please sign in to comment.