Skip to content

pass context to benchmarks#15

Open
hazeycode wants to merge 1 commit into
Hejsil:masterfrom
hazeycode:master
Open

pass context to benchmarks#15
hazeycode wants to merge 1 commit into
Hejsil:masterfrom
hazeycode:master

Conversation

@hazeycode

Copy link
Copy Markdown
Contributor

allows user to keep resource cleanup out of measured function

@Hejsil

Hejsil commented Jun 6, 2022

Copy link
Copy Markdown
Owner

Hi. This seems like a subset of what I suggested in this comment, which I would rather do than this. It's not something I've taken the time to do though

@hazeycode

Copy link
Copy Markdown
Contributor Author

Hi. This seems like a subset of what I suggested in this comment, which I would rather do than this. It's not something I've taken the time to do though

Possibly. I think this change can be considered separately though; critically, it allows separating resource cleanup. I don't know what the best API for defining comptime and runtime inputs looks like but it will surely have to pass some runtime context in.

@hazeycode hazeycode mentioned this pull request Jun 6, 2022
@hazeycode

Copy link
Copy Markdown
Contributor Author

In case it's useful at all; here's a use case of runtime args (using this change only)
https://github.com/hazeycode/brucelib/blob/d69d0c4ceda3400794b98b939bc4b8ffba39e727/modules/algo/src/delaunay.zig#L247-L282

allows user to keep resource cleanup out of measured function
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.

2 participants