Skip to content

bench: update C benchmark snippets to use random_uniform#11691

Open
anandkaranubc wants to merge 1 commit intostdlib-js:developfrom
anandkaranubc:bench/snippets-c
Open

bench: update C benchmark snippets to use random_uniform#11691
anandkaranubc wants to merge 1 commit intostdlib-js:developfrom
anandkaranubc:bench/snippets-c

Conversation

@anandkaranubc
Copy link
Copy Markdown
Contributor

Resolves None

Description

What is the purpose of this pull request?

This pull request:

  • updates C benchmark snippets to use random_uniform

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

  • None

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

N/A


@stdlib-js/reviewers

@anandkaranubc anandkaranubc requested a review from a team April 21, 2026 09:39
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 21, 2026
@anandkaranubc
Copy link
Copy Markdown
Contributor Author

I could be wrong about making this change, but since we are moving toward using random_uniform in our C benchmarks, I thought we could update the snippets.

@anandkaranubc anandkaranubc added the Benchmarks Pull requests adding or improving benchmarks for measuring performance. label Apr 21, 2026
static double tic( void );
static float rand_float( void );
static double rand_double( void );
static float random_uniformf( const float min, const float max );
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The float version we use is also called random_uniform. I'm not sure what we can do here so it is also not confusing to contributors following snippets for benchmark file references.

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

Labels

Benchmarks Pull requests adding or improving benchmarks for measuring performance. Needs Review A pull request which needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants