Giter VIP home page Giter VIP logo

normalization-bench's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

normalization-bench's Issues

Prefer input terms which could have been hand-written

Looking at the benchmark code, I see that large numerals are being inlined to benchmark input. Instead, I think it's better to have input terms which are realistic as hand-written source code, because most of the time we execute user source code in practical settings (with some exceptions, like bloat generated by tactics).

Large numerals and insufficient code structure could be a reason why compiled code is not doing well in the benchmarks, especially in Church multiplication. In my old benchmarks I did find that compiled HOAS in GHC was significantly faster than interpretation. Perhaps OCaml compilation is that much worse than GHC, but I don't find that likely; I would expect that compiled Church multiplication is significantly faster than the interpreted one.

For compiled code it would be good to have primitive let-definitions in terms which can be translated to actual OCaml let-s. Using beta-redexes to emulate let is possible of course, but that's also highly unrealistic as input to the OCaml compiler and it would be probably handled worse.

Set runtime GC options

It would be worth to set runtime options: https://v2.ocaml.org/manual/runtime.html#s%3Aocamlrun-options I have found that GC options have a very significant effect on overall performance in normalization/conversion checking. We'd also want to use tuned GC settings in real-world implementations, so it's more realistic IMO to benchmark with them. I used export OCAMLRUNPARAM="v=0x400,s=100000000,i=100000000" to significant effect, your mileage may vary.

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.