pekko-http icon indicating copy to clipboard operation
pekko-http copied to clipboard

renderRfc1123DateTimeString can be faster

Open He-Pin opened this issue 6 months ago • 2 comments

Motivation:

In recent https://github.com/zio/zio-http/pull/3550 , it shows much faster than the default one, I think this can be faster than the renderRfc1123DateTimeString in current pekko-http too.

Image

He-Pin avatar Jun 22 '25 08:06 He-Pin

Is that based on any real world measurements? You only need to render once per second for http, so shaving off 500ns every second does not matter.

Besides that DateTime rendering is probably just fast enough since its optimization in 2011. Not sure if we tweeted about it, though...

jrudolph avatar Jun 22 '25 09:06 jrudolph

This is a synthetic benchmark for sure. The goal is actually not performance, but decoupling from netty. The benchmark was only to show that we did not become slower. If you should make a change, idk. But I did my best to avoid any unnecessary operations/allocations.

987Nabil avatar Jun 25 '25 13:06 987Nabil