[SR-11418] Add Graph Algorithm benchmarks to test unowned, weak, and unmanaged #53819
Labels
benchmarks
compiler
The Swift compiler in itself
good first issue
Good for newcomers
standard library
Area: Standard library umbrella
task
Additional Detail from JIRA
md5: 4c8274584ae974ce398c7d395aad0770
Issue Description:
Right now IIRC we do not have any (public) benchmarks testing the performance of unowned, weak, Unmanaged. In fact when I just did a git grep for weak or unowned I did not see /any/ references in the benchmark suite. We should add new benchmarks that test the codegen here for all 3.
With that in mind, one type of benchmark that is straight forward to write to test this performance is to write graph algorithms on graphs that use non-strong pointers internally to maintain the graph edges to prevent reference cycles in the graph.
NOTE: The reason I put this in Compiler and Standard Library is b/c the missing coverage of Unmanaged in benchmarking involves missing stdlib benchmarking coverage.
Some ideas of algorithms:
1. Dijkstra Algorithm.
2. Computing the post order numbers for a graph (or providing a topological order).
3. Computing strongly connected components of a graph.
These are just some off the top of my head.
I would say we should also look at DeltaBlue but I think there is a licensing issue. If we eventually convert the benchmark suite so we only use the package toolchain, it should be easy to put DeltaBlue into a different repo and make it an optional dependency.
The text was updated successfully, but these errors were encountered: