Skip to content

Conversation

@kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Oct 30, 2023

I audited all of the TypedArray allocations I could find (I searched for /\dArray\(/ and ".slice("). I didn't measure a speedup from these changes, but the resulting code is a little more tidy.

Added comments to all of the places that I determined did not need any changes.
I also looked at expectGPUBufferRepeatsSingleValue, which has a few allocations, but I didn't attempt to profile anything there, as there's O(1) allocations there for the entire operation. It might have some unnecessary memory copying, but I don't think suspect it's that much.

Issue: None


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located in the test tree.
  • Test descriptions allow a reader to "read only the test plans and evaluate coverage completeness", and accurately reflect the test code.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Helpers and types promote readability and maintainability.

When landing this PR, be sure to make any necessary issue status updates.

@kainino0x kainino0x requested a review from dneto0 October 30, 2023 23:41
@kainino0x kainino0x enabled auto-merge (rebase) October 30, 2023 23:42
@kainino0x kainino0x disabled auto-merge October 30, 2023 23:42
@github-actions
Copy link

Previews, as seen when this build job started (fe03729):
Run tests | View tsdoc

@kainino0x kainino0x requested a review from zoddicus November 2, 2023 06:09
@kainino0x kainino0x enabled auto-merge (squash) November 2, 2023 16:10
@kainino0x kainino0x merged commit b226a45 into gpuweb:main Nov 2, 2023
@kainino0x kainino0x deleted the garbage branch November 2, 2023 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants