Giter VIP home page Giter VIP logo

jcompiler's People

Contributors

dependabot[bot] avatar mattjquinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jcompiler's Issues

SIMD/CUDA support

J's focus on arrays lends itself naturally to parallelization, experiment with ways to harness SIMD/CUDA for extra speedups.

Unable to consistent deploy built documentation from travis to GitHub pages.

Using cargo doc-upload gives inconsistent results from the Travis build; it worked at one point but now it doesn't. Rather than use GitHub pages, something like S3 should be used to prevent use of a repo branch itself to store the documentation.

Also note that benchmark reports using criterion should be placed in a subfolder of the built docs so that the latest reports can be linked to from ie README.md.

Minimize heap allocations, put as much as possible on the stack.

For performance reasons, as much as possible should be allocated on the stack. Currently malloc calls are favored to keep the code understandable in its early stages, but in the future stack-only allocations should become a focus.

For instance, rather than malloc arrays we can decrement the stack pointer continually until we reach the end. The number of decrements is the length of the array. We can then apply a monadic function directly to this array, or for dyads, we remember the verb, store the next array, and intelligently operate on the two arrays. As a rough example:

1 + 2 3 4 becomes: sub $sp, store 1 $len1, (remember "+"), store $sp,
sub $sp (3 times), store 3 $len2, then call add 3 times

Arrays of random length, or whose length are unknown at compile time, should have the same thing done; the number of decrements to the stack pointer simply becomes variable and verb code will need to handle it accordingly.

Arthur Whitney seems to use only the stack in his B language interpreter, so maybe get some inspiration there:
http://kparc.com/b/
https://docs.google.com/document/d/1W83ME5JecI2hd5hAUqQ1BVF32wtCel8zxb7WPq-D4f8/edit
https://github.com/tlack/b-decoded

And while this early interpreter for J uses malloc, there should be something to learn here as well:
https://code.jsoftware.com/wiki/Essays/Incunabulum

http://www.jsoftware.com/help/jforc/contents.htm#_Toc191734291

APL: A Glimpse of Heaven: https://news.ycombinator.com/item?id=19325361
K7 Tutorial: https://news.ycombinator.com/item?id=19418570

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.