Comments (4)
... 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.
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.
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.
Closing because the narrow
optimization seems to be valuable in practice and not a candidate for removal.
from raptorjit.
Related Issues (20)
- Idea: Remove Lua C-API HOT 41
- Philosophy: Who is RaptorJIT for? HOT 1
- RaptorJIT language side evolution and Lua compatibility HOT 3
- A world on FFI HOT 6
- Benchmark: FFI
- Idea: Separate snapshot for each function call
- raptorjit release version confusion HOT 2
- Idea: Write Lua parser and bytecode compiler in Lua HOT 19
- Question: How to send relevant fixes to LuaJIT?
- Document VM bootstrap, code generation, build process HOT 2
- Idea: CNEWI sinking across trace boundaries HOT 4
- Demo: Over 50x slowdown on pointer arithmetic due to single branch
- Windows support HOT 2
- Openresty HOT 8
- Optimization: lambda lifting HOT 7
- Initial port of RaptorJIT bytecode interpreter to C
- Filling the gap with Lua 5.3 HOT 2
- Apply to GitHub sponsorship HOT 3
- LuaJIT/RaptorJIT at FOSDEM 2020?
- Linking failed on ArchLinux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raptorjit.