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

Collaboration #1

Open
Robert-j7 opened this issue Oct 25, 2022 · 3 comments
Open

Collaboration #1

Robert-j7 opened this issue Oct 25, 2022 · 3 comments

Comments

@Robert-j7
Copy link

This is for continuing on the interaction we had. I'm more than happy to help. Please plan out what is left to do and we can discuss how I will do the tasks.

@Robert-j7
Copy link
Author

I also did a quick benchmark and JSON3 was 2.5 times faster and had way less allocations.

@quinnj
Copy link
Owner

quinnj commented Oct 31, 2022

Thanks for opening this issue! And sorry for the slow response. Can you share the code that you benchmarked?

@Robert-j7
Copy link
Author

I did a bigger test file and it is kinda night and day difference maybe I'm doing something wrong? I'm using JSONBase.read function from the package. Here is the code:

function JSBase()
       for i in eachindex(test)
       JSONBase.read(test[i])
       end
end

function JS3()
       for i in eachindex(test)
       JSON3.read(test[i])
       end
end

@benchmark JSBase()
BenchmarkTools.Trial: 1 sample with 1 evaluation.
 Single result which took 6.949 s (0.87% GC) to evaluate,
 with a memory estimate of 590.88 MiB, over 14346773 allocations.

@benchmark JS3()
BenchmarkTools.Trial: 22 samples with 1 evaluation.
 Range (min … max):  224.197 ms … 254.224 ms  ┊ GC (min … max): 21.74% … 23.47%
 Time  (median):     238.218 ms               ┊ GC (median):    22.18%
 Time  (mean ± σ):   237.677 ms ±   8.816 ms  ┊ GC (mean ± σ):  22.65% ±  1.76%

  █▁  ▁     ▁     ▁ ▁    █ ▁ ▁ ▁▁ ██▁               ▁   ▁  ▁  ▁  
  ██▁▁█▁▁▁▁▁█▁▁▁▁▁█▁█▁▁▁▁█▁█▁█▁██▁███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁█▁▁█▁▁█ ▁
  224 ms           Histogram: frequency by time          254 ms <

 Memory estimate: 242.61 MiB, allocs estimate: 430801.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants