guest0x0 / normalization-bench Goto Github PK
View Code? Open in Web Editor NEWBenchmarking various normalization algorithms for the lambda calculus
Benchmarking various normalization algorithms for the lambda calculus
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.