Skip to content

Optimize _prepare_touch_action in action_fns by avoiding intermediate list and dict allocations.#352

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_936811690
Open

Optimize _prepare_touch_action in action_fns by avoiding intermediate list and dict allocations.#352
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_936811690

Conversation

@copybara-service

Copy link
Copy Markdown

Optimize _prepare_touch_action in action_fns by avoiding intermediate list and dict allocations.

Benchmark results (local runs, n=100,000):

name old time/op new time/op delta
PrepareTouchAction_1f 4493 ns 3954 ns -12.00%
PrepareTouchAction_3f 13576 ns 12629 ns -6.97%

… list and dict allocations.

Benchmark results (local runs, n=100,000):

| name | old time/op | new time/op | delta |
| :--- | :--- | :--- | :--- |
| PrepareTouchAction_1f | 4493 ns | 3954 ns | -12.00% |
| PrepareTouchAction_3f | 13576 ns | 12629 ns | -6.97% |

PiperOrigin-RevId: 936811690
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.

1 participant