Repository navigation
bench: add native C benchmark to math/base/special/cfloor - #16331
Draft
Planeshifter wants to merge 2 commits into
Draft
Planeshifter wants to merge 2 commits into
Planeshifter wants to merge 2 commits into
Conversation
Added missing `benchmark/c/native/Makefile` and `benchmark/c/native/benchmark.c` (present in 383/384, 99.7%, of `math/base/special` packages, including `cceil`, `cceilf`, `cfloorf`, and `cfloorn`). Content mirrors `math/base/special/cceil` with the package name and C function substituted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD77jkABgfoQzdCbeSyY
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
Port of #16328. CI `npm install` currently fails building `@kaciras/deasync` (`binding.gyp not found`), breaking `Lint PR title` and other install-dependent jobs. This change no-ops once the base branch carries the same pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017wWD77jkABgfoQzdCbeSyY
Member
Author
|
I ported the fix from #16328 (pin Generated by Claude Code |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request:
math/base/special/cfloor. Every other package inmath/base/specialthat ships a C implementation already has one.math/base/special/cfloorbenchmark/c/native/Makefileandbenchmark/c/native/benchmark.c. 383 of 384 packages in the namespace (99.7%) have these files, includingcceil,cceilf,cfloorf, andcfloorn.cflooralready providessrc/main.c,lib/native.js,benchmark/benchmark.native.js, and abenchmarktask inmanifest.json. Its only C benchmark wasbenchmark/c/benchmark.c, which times libmfloorrather thanstdlib_base_cfloor.cceil/benchmark/c/native/benchmark.c, with the package name and C function swapped. TheMakefilematchescceilandcroundapart from the copyright year.Related Issues
None.
Reference Packages
This pull request followed these packages:
math/base/special/cceilMakefile, the TAP output, and the random input generation.NAME, and the function under test (stdlib_base_cfloor).Questions
No.
Other
How the drift was found. We extracted structural features (file tree,
package.jsonkeys, README section order,manifest.jsonkeys) and semantic features (JSDoc shape, error construction, validation prologue) from all 384 packages inmath/base/special. Any feature with at least 75% agreement counted as the majority pattern.maxn,minn,maxabsn,minabsn,minmaxn,minmaxabsn, andsicihave no C implementation at all. Adding one is not a mechanical fix.kernel-cos,kernel-sin,kernel-tan, andrempio2READMEs have an extra### Notessection under## C APIs. This adds content and doesn't break the pattern.fastis a nested namespace, not a package.src/main.c(94.8%) ship a C benchmark.cfloorand that no tests, examples, or docs depend on its absence. Open PR feat: addassignandstridedmethods tomath/base/special/cfloor#16025 also touchescfloor, but it does not addbenchmark/c/native, so the two don't overlap.gcc -std=c99 -O3against the package sources and run successfully: 1e6 iterations, TAPok.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code, as part of an automated check for drift between packages in a namespace.
Generated by Claude Code