-
-
Notifications
You must be signed in to change notification settings - Fork 10
impr: Make the compiledIO benchmarks fairer #1089
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to make the compiledIO benchmarks fairer by adjusting how data is written and accessed in various components.
- Update the compiled writer to use array indexing for vector and matrix component access
- Cache the compiled writer in the buffer implementation to avoid repeated evaluations
- Revise benchmark test suites to create and populate data buffers more directly
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/typegpu/src/data/compiledIO.ts | Updated component access in writer code and added a console.log for debugging purposes |
packages/typegpu/src/core/buffer/buffer.ts | Cached the compiled writer to reuse previous evaluation results |
apps/typegpu-docs/src/pages/benchmark/test-suites/compiled-write.ts | Updated data initialization and buffer writing steps in multiple benchmark scenarios |
Comments suppressed due to low confidence (1)
apps/typegpu-docs/src/pages/benchmark/test-suites/compiled-write.ts:143
- [nitpick] Initializing the boid data arrays as new Array(amountOfBoids) leaves their elements undefined; it might be clearer to initialize these arrays with default objects or null values to set expectations for later assignments.
ctx.typegpuBoidData[size] = new Array(amountOfBoids);
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pkg.pr.new packages
benchmark commit |
No description provided.