Skip to content

Fix recursive functions have higher inclusive cost than main#142

Open
TRowbotham wants to merge 1 commit into
jokkedk:masterfrom
TRowbotham:fix-33
Open

Fix recursive functions have higher inclusive cost than main#142
TRowbotham wants to merge 1 commit into
jokkedk:masterfrom
TRowbotham:fix-33

Conversation

@TRowbotham

@TRowbotham TRowbotham commented Jun 1, 2021

Copy link
Copy Markdown

Fixes the example given in #33 without trying to detect cycles. The costs of a calling function are reported as inclusive costs. When recursion happens, we don't want to add the inclusive cost of the called function to the calling function as they represent the same cost. This prevents inflating the inclusive cost of recursive functions, which should leave {main} with the highest inclusive cost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant