Imagine you are streaming changes from Postgres to Elasticsearch in Go. Everything works fine in dev. Then traffic ramps up, and suddenly your service can't keep up...
After profiling, you notice the bottleneck: JSON serialization.
Every document going to Elasticsearch needs to be encoded. At thousands of events per second, those microseconds add up fast. Go's standard `encoding/json` library is convenient, but it heavily relies on reflection.
Reflection is flexible, but that flexibility has a cost - it's slower than having the structure known at compile time.
And remember, there is never just one lib to do something in a language. People keep building and rebuilding things, often making them faster than what ships by default.
So instead of relying on the standard `encoding/json`, there is a Go package `jsoniter`. In that, decoding a medium payload takes 35,510 ns/op with 99 allocations using the standard library. jsoniter does it in 5,623 ns/op with just 3 allocations. Over 6x faster with 97% fewer allocations.
Insane.
This doesn't mean you should immediately rewrite your code. But if you ever find JSON serialization sitting at the top of your flame graph :) switching to jsoniter or whatever is most efficient at that time can save you a lot of pain.
Btw, you will find something similar in every language for every kind of work. Use this post as a reminder to look beyond default :)
Hope this helps.
if you’re in software, pivot to hardware.
now is the window.
the world is being rebuilt in atoms, not just bits.
energy, grids, batteries, robotics, autonomy, manufacturing, materials; all undergoing phase-change.
software alone is saturated.
hardware is starving for talent.
the tooling is cheaper.
the docs are everywhere.
the components are accessible.
the ecosystems are open.
the demand is insane.
every major frontier today has a hardware bottleneck.
robots need actuators.
ai needs sensors.
grids need controllers.
batteries need bms.
factories need automation.
cities need devices.
software guys who pick up hardware become dangerous.
you already think in systems.
you already understand abstraction.
you already debug well.
add electronics, control, mechanical intuition; you become future-proof.
pivot.
learn circuits.
learn firmware.
learn control.
build small.
then build real.
this is the best moment in decades to cross the bridge.