GithubHelp home page GithubHelp logo

Comments (4)

lukego avatar lukego commented on May 26, 2024

... actually it looks like my use of unifdef in #5 was not extensive enough to remove the single-vs-dual number modes from RaptorJIT. This is lucky because now we can see which one makes the right performance/simplicity trade-off and remove the other!

from raptorjit.

lukego avatar lukego commented on May 26, 2024

I am slightly fascinated with the narrow optimization at the moment. I will do some tests to check how important it is in practice.

I suspect that it will prove to be beneficial: eliminating guard and conversion instructions, utilizing the integer-only ALUs (ports 5,6), and making other optimizations like fold more effective by letting them operate on integers instead of floats.

However, if it did prove to be unbeneficial then that would be a bit thrilling. The narrow optimization is a lot of tricky code that would be lovely to eliminate, and that may have the knock-on effect of being able to remove a bunch of integer-oriented optimizations from fold. I doubt it will pan out that way but feel obliged to check.

from raptorjit.

lukego avatar lukego commented on May 26, 2024

I tested -O-narrow on the Snabb CI. The report takes some practice to interpret but it shows a definite degradation of the lukego-optimize benchmark result probability distribution compared with the master reference one. Ballpark 5% slowdown on the l2fwd benchmarks (and no apparent impact on the iperf benchmark.) These benchmarks both do a lot of integer operations including with 16/32/64 bit FFI values.

So the good news is that narrow is beneficial in practice on Intel CPUs. The bad news is that the benefit may be fairly modest even though the code is quite complex.

I will look at some more optimizations and benchmarks.

from raptorjit.

lukego avatar lukego commented on May 26, 2024

Closing because the narrow optimization seems to be valuable in practice and not a candidate for removal.

from raptorjit.

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.