Does your PureScript project have a benchmarking script?

Calling out to the community: not for the first time, I find myself in need of a way to measure the impact of a proposed change to the compiler on run-time performance.

Have you worked on a PureScript project that can be exercised as a stand-alone executable—i.e., doesn’t require a web client to test and doesn’t itself reach out to servers or databases or anything that can’t be easily stubbed? Have you written benchmarks for your project, or, at the very least, written tests that can be run from the command line and that take more than milliseconds to run? Or could you imagine doing so easily? And is the source to your project available to the public?

If so, please post a link here. In addition to helping with PureScript compiler development in general, you specifically may also benefit from having PureScript developers (me) optimize the compiler for your use case—or at least, with your use case in mind!

Thanks for reading!

1 Like

This will almost certainly need some work to bring it up to date, but https://github.com/hdgarrood/purescript-sequences has some!

2 Likes

Are you just interested in runtime performance or also compile-time performance?

Of course overall we’re interested in both. At the moment, I’m looking at a change that might impact run-time performance, and while there’s no shortage of large PureScript projects that can be used to bench compile-time performance, fewer projects meet all of the above criteria for being good run-time benchmarks, and I’d like to compile a list for us to use when the question comes up.

Ok. For compile time performance I can offer my barlow-lens library.

https://github.com/natefaubion/purescript-language-cst-parser has a benchmark script for parsing files. Being a typical parser, it has large binding groups, and might be relevant to what you are doing.

1 Like

I’m adding @PureFunctor’s uncurried-transformers library to this thread for my future reference.