eggsquad
eggsquad
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Very cool! I've just written it quickly from scratch so it is quite slow lol. I've thought about trying to port over the simdjson implementation, but that's a lot more time than I have right now https://github.com/simdjson/simdjson
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
EmberJson has its first release on prefix.dev in the mojo-community-nightly channel! https://prefix.dev/channels/mojo-community-nightly/packages/emberjson
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
I imagine probably not?
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Infer the type where exactly?
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Thank you! I think I’ll finally do an actual package release to prefix.dev tomorrow for nightly
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
There's also a collection of conformance test cases in this repo which was very helpful https://github.com/miloyip/nativejson-benchmark/tree/master/data/jsonchecker
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Tag you're it lol
--------------------------------------------------------------------------------
Benchmark results
--------------------------------------------------------------------------------
name , met (ms) , iters , min (ms) , mean (ms) , max (ms) , duration (ms)
JsonParseSmall , 0.010236, 100000, 0.010236, 0.010236, 0.010236, 1023.641000
JsonArrayMedium , 0.023358, 51153, 0.023358, 0.023358, 0.023358, 1194.818000
JsonArrayLarge , 0.062322, 19975, 0.062322, 0.062322, 0.062322, 1244.885000
JsonArrayExtraLarge, 6.513168, 184, 6.513168, 6.513168, 6.513168, 1198.423000
JsonArrayVeryBig , 22.549189, 53, 22.549189, 22.549189, 22.549189, 1195.107000
JsonBig3 , 68.620235, 17, 68.620235, 68.620235, 68.620235, 1166.544000
--------------------------------------------------------------------------------
Benchmark results
--------------------------------------------------------------------------------
name , met (ms) , iters , min (ms) , mean (ms) , max (ms) , duration (ms)
JsonParseSmall , 0.010236, 100000, 0.010236, 0.010236, 0.010236, 1023.641000
JsonArrayMedium , 0.023358, 51153, 0.023358, 0.023358, 0.023358, 1194.818000
JsonArrayLarge , 0.062322, 19975, 0.062322, 0.062322, 0.062322, 1244.885000
JsonArrayExtraLarge, 6.513168, 184, 6.513168, 6.513168, 6.513168, 1198.423000
JsonArrayVeryBig , 22.549189, 53, 22.549189, 22.549189, 22.549189, 1195.107000
JsonBig3 , 68.620235, 17, 68.620235, 68.620235, 68.620235, 1166.544000
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
No description
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
StringSlice is basically just a Span wrapper at this point, and Span doesn't work with strided steps at the moment, so expression like this currently require it to copy into a new String
var s = "some string"
print(s[:3:-1])
var s = "some string"
print(s[:3:-1])
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Ah yes that has yielded quite the improvement, thank you for pointing that out!
--------------------------------------------------------------------------------
Benchmark results
--------------------------------------------------------------------------------
name , met (ms) , iters , min (ms) , mean (ms) , max (ms) , duration (ms)
JsonParseSmall , 0.020933, 57400, 0.020933, 0.020933, 0.020933, 1201.580000
JsonArrayMedium , 0.054992, 21948, 0.054992, 0.054992, 0.054992, 1206.966000
JsonArrayLarge , 0.128410, 9324, 0.128410, 0.128410, 0.128410, 1197.299000
JsonArrayExtraLarge, 13.749082, 85, 13.749082, 13.749082, 13.749082, 1168.672000
JsonArrayVeryBig , 46.724640, 25, 46.724640, 46.724640, 46.724640, 1168.116000
--------------------------------------------------------------------------------
Benchmark results
--------------------------------------------------------------------------------
name , met (ms) , iters , min (ms) , mean (ms) , max (ms) , duration (ms)
JsonParseSmall , 0.020933, 57400, 0.020933, 0.020933, 0.020933, 1201.580000
JsonArrayMedium , 0.054992, 21948, 0.054992, 0.054992, 0.054992, 1206.966000
JsonArrayLarge , 0.128410, 9324, 0.128410, 0.128410, 0.128410, 1197.299000
JsonArrayExtraLarge, 13.749082, 85, 13.749082, 13.749082, 13.749082, 1168.672000
JsonArrayVeryBig , 46.724640, 25, 46.724640, 46.724640, 46.724640, 1168.116000
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
Oh upon further reading I didn’t realize Unicode respects the same first 128 characters as ascii. I’ll try reading it from raw bytes as you’ve done and see where that gets me
38 replies
MModular
Created by eggsquad on 10/16/2024 in #community-showcase
EmberJson: High level JSON library
How are you measuring?
38 replies
MModular
Created by Jack Clayton on 5/11/2024 in #community-showcase
Lightbug HTTP: Mojo web framework
FYI I was running it on an M3 chip
70 replies