Skip to content

bench: use string interpolation in math/base/special/abs#10734

Merged
Planeshifter merged 1 commit intostdlib-js:developfrom
travisbreaks:fix/issue-8647-abs-bench-interpolation
Mar 6, 2026
Merged

bench: use string interpolation in math/base/special/abs#10734
Planeshifter merged 1 commit intostdlib-js:developfrom
travisbreaks:fix/issue-8647-abs-bench-interpolation

Conversation

@travisbreaks
Copy link
Copy Markdown
Contributor


type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown status: na
  • task: lint_package_json status: na
  • task: lint_repl_help status: na
  • task: lint_javascript_src status: na
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: na
  • task: lint_javascript_tests status: na
  • task: lint_javascript_benchmarks status: passed
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: na
  • task: lint_typescript_tests status: na
  • task: lint_license_headers status: passed ---

Ref: #8647

Description

What is the purpose of this pull request?

This pull request migrates the JavaScript benchmarks in @stdlib/math/base/special/abs from string concatenation to @stdlib/string/format when specifying benchmark names.

Changes:

  • benchmark.js: pkg+'::built-in'format( '%s::built-in', pkg )
  • benchmark.native.js: pkg+'::native'format( '%s::native', pkg )

Both files now import @stdlib/string/format.

Related Issues

Does this pull request have any related issues?

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request?

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

Used Claude to identify the package and apply the string interpolation pattern per the RFC instructions.


@stdlib-js/reviewers

Co-authored-by: Egger egger@horny-toad.com

Replace string concatenation with `@stdlib/string/format` when
specifying benchmark names in JavaScript benchmarks for the
`@stdlib/math/base/special/abs` package, improving readability
and enabling future benchmark name linting.

Ref: stdlib-js#8647

Co-authored-by: Egger <egger@horny-toad.com>
@stdlib-bot stdlib-bot added Math Issue or pull request specific to math functionality. First-time Contributor A pull request from a contributor who has never previously committed to the project repository. Needs Review A pull request which needs code review. Good First PR A pull request resolving a Good First Issue. labels Mar 6, 2026
@Planeshifter Planeshifter added the Ready To Merge A pull request which is ready to be merged. label Mar 6, 2026
@stdlib-bot stdlib-bot removed the Needs Review A pull request which needs code review. label Mar 6, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Mar 6, 2026

PR Commit Message

bench: use string interpolation in `math/base/special/abs`

PR-URL: https://github.com/stdlib-js/stdlib/pull/10734
Ref: https://github.com/stdlib-js/stdlib/issues/8647

Assisted-by: Egger <egger@horny-toad.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>

Please review the above commit message and make any necessary adjustments.

⚠️ Action Required: This PR references tracking issues. Please update the PR description to replace any "Closes", "Fixes", or "Resolves" keywords with "Ref" when referencing these issues.

@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/base/special/abs $\color{green}317/317$
$\color{green}+100.00%$
$\color{green}10/10$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}317/317$
$\color{green}+100.00%$

The above coverage report was generated for the changes in this PR.

@stdlib-bot stdlib-bot removed the First-time Contributor A pull request from a contributor who has never previously committed to the project repository. label Mar 6, 2026
@Planeshifter Planeshifter merged commit 6f7ee58 into stdlib-js:develop Mar 6, 2026
101 of 103 checks passed
@stdlib-bot stdlib-bot removed the Ready To Merge A pull request which is ready to be merged. label Mar 6, 2026
Witty-31-06 pushed a commit to Witty-31-06/stdlib that referenced this pull request Mar 7, 2026
PR-URL: stdlib-js#10734
Ref: stdlib-js#8647

Assisted-by: Egger <egger@horny-toad.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First PR A pull request resolving a Good First Issue. Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants