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

Improve function lookup perfomance #141

Closed
wants to merge 9 commits into from

Conversation

philipc
Copy link
Contributor

@philipc philipc commented Sep 10, 2019

WIP. This is intended to address the remainder of rust-lang/backtrace-rs#232 (comment).

It currently requires a new low level DIE parser in gimli, but I want to do more investigation to see if that can be avoided.

test context_new                          ... bench:   2,689,811 ns/iter (+/- 80,009)
test context_new_and_query_location       ... bench:   2,924,974 ns/iter (+/- 61,652)
test context_new_and_query_with_functions ... bench:   3,714,168 ns/iter (+/- 106,249)
test context_new_parse_functions          ... bench:  58,153,225 ns/iter (+/- 1,042,687)
test context_new_parse_lines              ... bench:  12,062,770 ns/iter (+/- 317,826)
test context_query_location               ... bench:     255,901 ns/iter (+/- 19,211)
test context_query_with_functions         ... bench:     553,156 ns/iter (+/- 15,365)

test new                                 ... bench:      31,775 ns/iter (+/- 2,929)
test new_unresolved                      ... bench:       6,658 ns/iter (+/- 522)
test new_unresolved_and_resolve_separate ... bench:      32,163 ns/iter (+/- 1,357)
test trace                               ... bench:       3,624 ns/iter (+/- 757)
test trace_and_resolve_callback          ... bench:      16,839 ns/iter (+/- 1,396)
test trace_and_resolve_separate          ... bench:      15,124 ns/iter (+/- 792)
test context_new                          ... bench:   2,702,296 ns/iter (+/- 296,685)
test context_new_and_query_location       ... bench:   2,953,571 ns/iter (+/- 136,819)
test context_new_and_query_with_functions ... bench:   3,717,015 ns/iter (+/- 228,221)
test context_new_parse_functions          ... bench:  58,148,722 ns/iter (+/- 866,641)
test context_new_parse_lines              ... bench:  12,295,509 ns/iter (+/- 385,704)
test context_query_location               ... bench:     256,937 ns/iter (+/- 17,023)
test context_query_with_functions         ... bench:     539,912 ns/iter (+/- 34,276)

test new                                 ... bench:      27,589 ns/iter (+/- 1,830)
test new_unresolved                      ... bench:       6,638 ns/iter (+/- 392)
test new_unresolved_and_resolve_separate ... bench:      27,754 ns/iter (+/- 3,132)
test trace                               ... bench:       3,376 ns/iter (+/- 264)
test trace_and_resolve_callback          ... bench:      12,471 ns/iter (+/- 695)
test trace_and_resolve_separate          ... bench:      11,053 ns/iter (+/- 1,168)
test context_new                          ... bench:   2,720,461 ns/iter (+/- 464,712)
test context_new_and_query_location       ... bench:   2,936,127 ns/iter (+/- 106,143)
test context_new_and_query_with_functions ... bench:   4,146,384 ns/iter (+/- 163,488)
test context_new_parse_functions          ... bench:  96,296,536 ns/iter (+/- 1,540,496)
test context_new_parse_lines              ... bench:  12,177,495 ns/iter (+/- 425,962)
test context_query_location               ... bench:     254,580 ns/iter (+/- 21,041)
test context_query_with_functions         ... bench:     546,138 ns/iter (+/- 43,029)

test new                                 ... bench:      22,553 ns/iter (+/- 1,653)
test new_unresolved                      ... bench:       6,750 ns/iter (+/- 350)
test new_unresolved_and_resolve_separate ... bench:      22,397 ns/iter (+/- 1,301)
test trace                               ... bench:       3,466 ns/iter (+/- 141)
test trace_and_resolve_callback          ... bench:       8,549 ns/iter (+/- 637)
test trace_and_resolve_separate          ... bench:       7,155 ns/iter (+/- 506)
Useful for profiling single runs.
test context_new                          ... bench:   2,721,087 ns/iter (+/- 49,830)
test context_new_and_query_location       ... bench:   2,953,724 ns/iter (+/- 76,537)
test context_new_and_query_with_functions ... bench:   3,913,538 ns/iter (+/- 49,622)
test context_new_parse_functions          ... bench:  76,957,117 ns/iter (+/- 1,471,208)
test context_new_parse_lines              ... bench:  11,935,227 ns/iter (+/- 144,179)
test context_query_location               ... bench:     253,530 ns/iter (+/- 8,913)
test context_query_with_functions         ... bench:     540,524 ns/iter (+/- 9,724)

test new                                 ... bench:      22,281 ns/iter (+/- 482)
test new_unresolved                      ... bench:       8,207 ns/iter (+/- 476)
test new_unresolved_and_resolve_separate ... bench:      22,478 ns/iter (+/- 2,117)
test trace                               ... bench:       3,411 ns/iter (+/- 389)
test trace_and_resolve_callback          ... bench:       8,186 ns/iter (+/- 116)
test trace_and_resolve_separate          ... bench:       7,032 ns/iter (+/- 192)
Probably an insignificant improvement, but useful for investigating
further improvements to attribute parsing.

test context_new                          ... bench:   2,657,042 ns/iter (+/- 43,056)
test context_new_and_query_location       ... bench:   2,941,788 ns/iter (+/- 255,415)
test context_new_and_query_with_functions ... bench:   3,857,074 ns/iter (+/- 69,891)
test context_new_parse_functions          ... bench:  73,517,990 ns/iter (+/- 1,729,201)
test context_new_parse_lines              ... bench:  11,944,828 ns/iter (+/- 182,715)
test context_query_location               ... bench:     252,005 ns/iter (+/- 7,147)
test context_query_with_functions         ... bench:     538,075 ns/iter (+/- 5,504)
test context_new                          ... bench:   2,747,535 ns/iter (+/- 166,311)
test context_new_and_query_location       ... bench:   2,963,413 ns/iter (+/- 152,404)
test context_new_and_query_with_functions ... bench:   3,660,421 ns/iter (+/- 160,430)
test context_new_parse_functions          ... bench:  53,373,055 ns/iter (+/- 758,664)
test context_new_parse_lines              ... bench:  12,021,065 ns/iter (+/- 443,317)
test context_query_location               ... bench:     253,700 ns/iter (+/- 23,305)
test context_query_with_functions         ... bench:     546,612 ns/iter (+/- 30,905)
@philipc
Copy link
Contributor Author

philipc commented Dec 6, 2019

This is all covered by other PRs now.

@philipc philipc closed this Dec 6, 2019
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