Open ghost opened 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.
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.
:+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.
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.
This is an old PR, not compatible any more, sorry for the noise.