You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
automatic profile guided optimization in release modes based on test cases #237
Have a set of test cases that are designed to mimic real world payload.
Zig compiler tries various optimization techniques, runs these tests, collects performance statistics, analyzes the results of the performance statistics to try different optimization techniques, and then finally settles on an optimization strategy informed by this process.
This can be used to inform which functions to inline, which parts of the code to apply certain optimization passes to, which parts of the code to perhaps not do this (maybe the instruction cache size was important there), and in other words have an optimization process guided by test data. I believe GCC has already paved the way for a lot of this research.
changed the title [-]optimization profiling based on test cases[/-][+]automatic profile guided optimization in release modes based on test cases[/+]on Aug 8, 2018
Would making sure that non-inlined functions that frequently call each other are placed in close proximity to each other in order to improve the instruction cache locality also be a thing that could be considered when performing such research?
A typical complex project would run system tests from end to end. It may fall into a local maximum to optimize by marked source-file unit tests. Instead, it may be better to support users registering "auto entry points" in zig.zon files.
Activity
[-]optimization profiling based on test cases[/-][+]automatic profile guided optimization in release modes based on test cases[/+]ThePC007 commentedon Oct 27, 2020
Would making sure that non-inlined functions that frequently call each other are placed in close proximity to each other in order to improve the instruction cache locality also be a thing that could be considered when performing such research?
VoilaNeighbor commentedon Mar 22, 2025
A typical complex project would run system tests from end to end. It may fall into a local maximum to optimize by marked source-file unit tests. Instead, it may be better to support users registering "auto entry points" in zig.zon files.