unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

JIT compiled code profiling, and sqrt #5366

Closed dolio closed 1 month ago

dolio commented 1 month ago

The main change in this PR is to add an argument to compile.native that turns on profiling around the main entry point. This means that the whole program gets profiled, printing out summaries every 60s and on program exit.

This doesn't allow you to profile particular sections of code, but it's easy to toggle when you're creating the program.

I also included the implementation of sqrt which Mitchell noticed was missing.