Git Product home page Git Product logo

Comments (2)

pablojorge avatar pablojorge commented on May 22, 2024

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.

jokey2k avatar jokey2k commented on May 22, 2024

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)

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.