lonestar-lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
bot@lemmy.smeargle.fansMB to Hacker News@lemmy.smeargle.fans · 11 months ago

I sped up serde_json strings by 20%

purplesyringa.moe

external-link
message-square
0
link
fedilink
  • cross-posted to:
  • rust@programming.dev
2
external-link

I sped up serde_json strings by 20%

purplesyringa.moe

bot@lemmy.smeargle.fansMB to Hacker News@lemmy.smeargle.fans · 11 months ago
message-square
0
link
fedilink
  • cross-posted to:
  • rust@programming.dev
I have recently done some performance work and realized that reading about my experience could be entertaining. Teaching to think is just as important as teaching to code, but this is seldom done; I think something I’ve done last month is a great opportunity to draw the curtain a bit. serde is the Rust framework for serialization and deserialization. Everyone uses it, and it’s the default among the ecosystem. serde_json is the official serde “mixin” for JSON, so when people need to parse stuff, that’s what they use instinctively. There are other libraries for JSON parsing, like simd-json, but serde_json is overwhelmingly used: it has 26916 dependents at the time of this post, compared to only 66 for simd-json. This makes serde_json a good target (not in a Jia Tan way) for optimization. Chances are, many of those 26916 users would profit from switching to simd-json, but as long as they aren’t doing that, smaller optimizations are better than nothing, and such improvements are reapt across the ecosystem.

HN Discussion

alert-triangle
You must log in or # to comment.

Hacker News@lemmy.smeargle.fans

hackernews@lemmy.smeargle.fans

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !hackernews@lemmy.smeargle.fans
lock
Community locked: only moderators can create posts. You can still comment on posts.

A mirror of Hacker News’ best submissions.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 86 users / day
  • 7 users / week
  • 2 users / month
  • 9 users / 6 months
  • 0 local subscribers
  • 2.17K subscribers
  • 15.3K Posts
  • 3.9K Comments
  • Modlog
  • mods:
  • bot@lemmy.smeargle.fans
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org