julienschmidt / go-http-routing-benchmark

Go HTTP request router and web framework benchmark
BSD 3-Clause "New" or "Revised" License
1.65k stars 238 forks source link

Add Iris v1 (nethttp) #57

Open ghost opened 8 years ago

ghost commented 8 years ago

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

CaptainCodeman commented 8 years ago

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.

julienschmidt commented 8 years ago

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.

CaptainCodeman commented 8 years ago

:+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.

julienschmidt commented 8 years ago

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.