Giter VIP home page Giter VIP logo

Comments (2)

bhauer avatar bhauer commented on May 30, 2024

While I agree on grounds of purity, I don't think adding trivial synthetic routing to the platforms that do not provide native routing (e.g., Netty) is going to affect the numbers to a measurable degree.

To add synthetic routing to Netty, we would either add a HashMap as a lookup table or simple String comparison as we did in the JavaScript tests. E.g.,

if ("/json".equals(uri))

In extremely rough spot checking on our i7 hardware:

  • Java performs 1B lookups on a 1-entry HashMap in ~6100ms for ~6.1ns per lookup. The added expense of 100,000 HashMap lookups (one lookup per request) would be roughly 0.61ms in total.
  • We can execute 1B trivial Java String comparisons in ~2700ms for ~2.7ns per String comparison. We could expect that roughly 0.27ms would added for a full test of 100,000 requests.

Bear in mind that the rough numbers above were gathered in a single-threaded test. Total additional time would probably be even lower with concurrency.

I agree on the purity goal though, so we should do this change.

from frameworkbenchmarks.

LadyMozzarella avatar LadyMozzarella commented on May 30, 2024

Closing - summarized a bit in documentation.

from frameworkbenchmarks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.