Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic profile guided optimization in release modes based on test cases #237

Open
andrewrk opened this issue Jan 31, 2017 · 1 comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. optimization
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jan 31, 2017

Research idea:

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.

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. optimization labels Jan 31, 2017
@andrewrk andrewrk added this to the 0.3.0 milestone May 7, 2017
@andrewrk andrewrk modified the milestones: 0.3.0, 0.4.0 Feb 28, 2018
@andrewrk andrewrk changed the title optimization profiling based on test cases automatic profile guided optimization in release modes based on test cases Aug 8, 2018
@andrewrk andrewrk modified the milestones: 0.4.0, 0.5.0 Feb 3, 2019
@andrewrk andrewrk modified the milestones: 0.5.0, 0.6.0 Sep 11, 2019
@andrewrk andrewrk modified the milestones: 0.6.0, 0.7.0 Oct 17, 2019
@andrewrk andrewrk modified the milestones: 0.7.0, 0.8.0 Apr 15, 2020
@ThePC007
Copy link

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?

@andrewrk andrewrk modified the milestones: 0.8.0, 0.9.0 Nov 6, 2020
@andrewrk andrewrk modified the milestones: 0.9.0, 0.10.0 May 19, 2021
@Vexu Vexu mentioned this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Solving this issue will likely involve adding new logic or components to the codebase. optimization
Projects
None yet
Development

No branches or pull requests

2 participants