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

Add Memory Consumption Calculation to Benchmark Function #4

Closed
hendriknielaender opened this issue Oct 24, 2023 · 2 comments · Fixed by #69
Closed

Add Memory Consumption Calculation to Benchmark Function #4

hendriknielaender opened this issue Oct 24, 2023 · 2 comments · Fixed by #69
Labels
enhancement New feature or request

Comments

@hendriknielaender
Copy link
Owner

🚀 Feature Proposal

Enhance the benchmark function to also measure and display memory consumption for the functions/methods being benchmarked?

Motivation

  • Performance Insight: While execution time gives us a good measure of efficiency, understanding memory consumption can be just as crucial, especially for applications running in memory-constrained environments or when dealing with large datasets.

  • Developer Awareness: Memory metrics will empower developers to make informed decisions about trade-offs, potentially leading to more optimized solutions.

  • Holistic Analysis: Providing both time and space performance metrics offers a more rounded view of our functions' efficiency.

Proposed Implementation

  1. Explore Zig's built-in functionalities for memory profiling.
  2. Integrate the memory measurement step within the existing benchmarking process.
  3. Present the memory consumption metrics alongside the current execution time metrics in the benchmark results.

Additional Context

  • Accuracy is Key: It's imperative that the memory measurements are accurate and that the measuring process itself doesn't introduce significant overhead or bias.

  • Toggle Feature: Ideally, we should have the ability to toggle this feature on and off based on our benchmarking requirements.

  • Documentation: Once implemented, a brief section in our project's documentation explaining how to interpret these memory metrics would be beneficial.

@hendriknielaender hendriknielaender added the enhancement New feature or request label Oct 24, 2023
@FObersteiner
Copy link
Collaborator

FObersteiner commented Oct 28, 2023

I think this would be very helpful. Since Zig puts emphasis on manual memory management and gives me a lot of possibilities to do so, I would be very much interested in how my changes to the code affect memory demand.

@jasperdunn
Copy link

Yeah, this would be incredible 🚀

@bens bens linked a pull request Mar 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants