Comments (2)
Hi @jokey2k, yes, it's unnecessarily complex and slow! The idea was to make it "elegant", not fast, then I added other versions to compare them.
Anyway, I added a second version similar to that example, and one which is also similar but slightly modified so it can be translated with RPython. I added a new table at the end comparing all versions. What's surprising is that the RPython version of the interpreter is faster than the C version, even compiled with optimizations! Only the brainfuck programs translated to C and then compiled run faster than the RPython interpreter.
Thanks for your suggestions!
from brainfuck.
That's the big pro when you compile something with a tracing jit. If there are loops, things are heavily speeded up ;) You are right, that otherwise some handcrafted this might be faster. but then concerning time of development and ease of maintenance gives most credit ;)
from brainfuck.
Related Issues (5)
- Incomplete analysis of rpython version HOT 2
- TypeScript Type System Implementation HOT 2
- Assembly Compiler HOT 1
- Missing License 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 brainfuck.