The Julia profiler
The Julia runtime includes a built-in profiler, which can be used to measure how long each line of code takes to run, relative to a certain code base. It can therefore be used to identify bottlenecks in code, which can, in turn, be used to prioritize optimization efforts.
This built-in system implements what is known as a sampling profiler. As its name suggests, it samples the program call stack at certain points in time. When the profiler is run, it stops and inspects the running system every few milliseconds (by default, 1 millisecond on UNIX, and 10 milliseconds on Windows). At every point, the profiler identifies the list of function calls (and the line of code they originate), from the start of the program to the current ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access