Zulip Chat Archive

Stream: lean4

Topic: Dave's Garage Benchmark


ohhaimark (Aug 25 2021 at 08:22):

The YouTube channel Dave's Garage initiated a benchmark of a bunch of languages. I have created a PR to add a Lean4 implementation (https://github.com/PlummersSoftwareLLC/Primes/pull/675). Feel free to check it out and try and improve things.

Andrés Goens (Aug 25 2021 at 08:45):

cool! Would be a nice kicker to add a proof that the sieve works, wouldn't it :grinning: ?

Mario Carneiro (Aug 25 2021 at 08:50):

Looking at the implementation, it is unfortunately not possible, because it makes use of Float.sqrt. There is probably another way to write it that avoids this

ohhaimark (Aug 25 2021 at 08:52):

Yeah, I just wanted to just get things working enough to PR before I try to write a proof friendly version.

Mario Carneiro (Aug 25 2021 at 08:52):

also Loop.forIn uses unbounded recursion

Marc Huisinga (Aug 25 2021 at 09:08):

leanprover/lean4:4.0.0-m2 is very old, but I guess it isn't fair to use a nightly version for a benchmark like that?

ohhaimark (Aug 25 2021 at 09:09):

@Marc Huisinga I wasn't aware of that. I just wanted to pin a specific version, so I avoided nightly.

Marc Huisinga (Aug 25 2021 at 09:11):

You can pin specific nightlies, e.g. leanprover/lean4:nightly-2021-08-24

Marc Huisinga (Aug 25 2021 at 09:11):

https://github.com/leanprover/lean4-nightly/releases

ohhaimark (Sep 02 2021 at 15:53):

Here is a tabulation of benchmarks including Lean4: https://plummerssoftwarellc.github.io/PrimeView/report?id=davepl-1630571740.json&hi=False&hf=False&hp=False&fi=&fp=&fa=&ff=&fb=&tp=True&sc=pp&sd=True


Last updated: Dec 20 2023 at 11:08 UTC