quinnj / JSON3.jl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Slowdown reading Mutable Structs (on master vs 0.1.13)

kmsquire opened this issue · comments

A benchmark of some local code (that I can't share, unfortunately)

On master:

julia> @btime read_data("test_data.json");
  75.436 ms (838945 allocations: 73.81 MiB)

On v0.1.13:

julia> @btime read_data("test_data.json");
  32.938 ms (365505 allocations: 16.01 MiB)

Profiling shows that the slowdown occurs in the MutableClosure / applyfield! code. Reverting just that section to the v0.1.13 version restores the timing/allocations.

Thanks for the report; I'll dig in