Skip to content

Conversation

@copybara-service
Copy link
Contributor

Use resevior sampling in auto-dictionary tracing and collection.

This is to avoid biases that favors later entries that always overwrite the earilers.

As side-effects, auto-dictionary tracing tables are filled randomly only after they become full of entries, and it saves the memory copying when it randomly decides to skip an entry.
Also the table cleanup is now lazy, and it clean only the previously used entries. It should be much faster than the previous method of zero-filling all the entries.

This is to avoid biases that favors later entries that always overwrite the earilers.

As side-effects, auto-dictionary tracing tables are filled randomly only after they become full of entries, and it saves the memory copying when it randomly decides to skip an entry.
Also the table cleanup is now lazy, and it clean only the previously used entries. It should be much faster than the previous method of zero-filling all the entries.

PiperOrigin-RevId: 845451974
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