go-http-routing-benchmark icon indicating copy to clipboard operation
go-http-routing-benchmark copied to clipboard

Add Iris v1 (nethttp)

Open ghost opened this issue 9 years ago • 4 comments

This is an old PR, not compatible any more, sorry for the noise.

ghost avatar Mar 22 '16 15:03 ghost

This makes it easier to compare performance but you are still using the caching middleware for your router which is not realistic. I don't understand why you feel the need to do this - your router has good performance.

This is meant to be a router benchmark, not a map / cache benchmark. If we wrap all the routers with the same cache middleware they'd pretty much all then produce identical results.

iris.New() should be replaced with iris.Custom(iris.StationOptions{Cache: false}) so people can make true and valid like-for-like comparisons.

CaptainCodeman avatar Mar 25 '16 20:03 CaptainCodeman

EDIT(2016-10-17): Removed an now obsolete comment about LARS

If you find any other framework doing stuff like that, please let me know. I will certainly not accept iris for the benchmarks like this.

julienschmidt avatar Mar 25 '16 20:03 julienschmidt

:+1:

I was going to suggest possibly varying the input parameters to make any cache explode but it shouldn't be necessary as long as the tests are policed to ensure they are fair and comparable.

CaptainCodeman avatar Mar 25 '16 20:03 CaptainCodeman

I'm very open to such suggestions. Please open a separate issue for them.

The usage of sync.Pool is also rather questionable. Basically all of the frameworks achieving "0 B" in all tests (actually they're not - it's just caching and amortization) use it. However, in the real world this pool is likely flushed by the GC.

julienschmidt avatar Mar 25 '16 20:03 julienschmidt