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

SoA optimization can over-promote objects used inside loops to produce slower code #1280

Open
WardBrian opened this issue Jan 23, 2023 · 0 comments · May be fixed by stan-dev/stan#3188
Open
Labels
bug Something isn't working cpp-codegen optimization

Comments

@WardBrian
Copy link
Member

WardBrian commented Jan 23, 2023

Current Behavior:

See this forum thread by @mike-lawrence which contains an example that is ~5x slower at --O1 compared to the default.

Expected Behavior:

SoA optimization should not promote things being assigned to inside of a tight for loop

@WardBrian WardBrian added bug Something isn't working cpp-codegen optimization labels Jan 23, 2023
@WardBrian WardBrian changed the title Function inlining can lead to much slower code in certain cases SoA optimization can over-promote objects used inside loops to produce slower code Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cpp-codegen optimization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant