Open zamazan4ik opened 11 months ago
Thanks for the interest here. Janet has a sort of builtin natural target for PGO in the bootstrapping process, which is just executing src/boot/boot.janet. For interpreters I imagine that anything that targets the instruction dispatch loop would be good, but other modules that I think would see big impacts are workloads that target src/core/peg.c (basically another interpreter inside the main interpreter).
Hacking the Makefile for PGO shouldn't be too difficult, but I haven't done it recently.
here's a better tutorial: Page 7 of https://llvm.org/devmtg/2020-09/slides/PGO_Instrumentation.pdf
Hi!
Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects. The results are here.
Since PGO showed measurable improvements in compiler/interpreter-like workloads (CPython, Clang, Clangd, clang-format, GCC, Rustc, CrosVM, etc.) I think it could be useful to check PGO for the Janet project too.
We need to perform PGO benchmarks on Janet. And if it shows improvements - add a note about possible improvements in Janet VM performance with PGO. Providing an easier way (e.g. a build option) to build scripts with PGO can be useful for the end-users too.