Skip to content
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

feat(semantic): memoize Bindings hashmap's key hash (POC) #8622

Closed

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented Jan 20, 2025

Attempt to reduce the total number of hashes here

if let Some(symbol_id) = bindings.get(name.as_str()).copied() {

This is a dump of code with no intention of being merged.

Copy link

graphite-app bot commented Jan 20, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request labels Jan 20, 2025
@Boshen Boshen force-pushed the 01-20-feat_semantic_memoize_bindings_hashmap_s_key_hash branch from 3beeef1 to df169ec Compare January 20, 2025 15:17
@Boshen Boshen force-pushed the 01-20-feat_semantic_memoize_bindings_hashmap_s_key_hash branch from df169ec to 9fa1d6b Compare January 20, 2025 15:27
self.cell.with_dependent_mut(|_allocator, inner| {
inner.bindings[scope_id].remove(name);
self.cell.with_dependent_mut(|allocator, inner| {
let key = Key::new(allocator.alloc_str(name));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wasteful, need to use the entry API instead.

Copy link

codspeed-hq bot commented Jan 20, 2025

CodSpeed Performance Report

Merging #8622 will not alter performance

Comparing 01-20-feat_semantic_memoize_bindings_hashmap_s_key_hash (9fa1d6b) with main (6801c81)

Summary

✅ 32 untouched benchmarks

@Boshen
Copy link
Member Author

Boshen commented Jan 20, 2025

Only 2%?

@Boshen Boshen closed this Jan 22, 2025
@Boshen Boshen deleted the 01-20-feat_semantic_memoize_bindings_hashmap_s_key_hash branch February 17, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant