Skip to content

Conversation

@Veykril
Copy link
Member

@Veykril Veykril commented Feb 12, 2025

No description provided.

@netlify
Copy link

netlify bot commented Feb 12, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 6181ddf
🔍 Latest deploy log https://app.netlify.com/sites/salsa-rs/deploys/67b81ca0b712aa0008cb436f

Comment on lines -80 to +83
assert!(v < (u32::MAX as usize));
assert!(v <= u32::MAX as usize);
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe both of these checks (here and for MemoIngredientIndex) were accidentally wrong

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 12, 2025

CodSpeed Performance Report

Merging #687 will not alter performance

Comparing Veykril:veykril/push-pwqsvzurlkun (6181ddf) with master (198db98)

Summary

✅ 9 untouched benchmarks

@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch from 4316b76 to a93ba43 Compare February 12, 2025 12:58
@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch from a93ba43 to d894400 Compare February 12, 2025 13:17
src/zalsa.rs Outdated
_ = self.cached_data.compare_exchange(
Self::UNINITIALIZED,
packed,
Ordering::AcqRel,
Copy link
Member

Choose a reason for hiding this comment

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

Release is sufficient here, there's no need for Acquire if the current thread wins the race (though of course both are correct).

@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch from d894400 to 971e52b Compare February 13, 2025 09:56
src/zalsa.rs Outdated
Comment on lines 349 to 351
// This is a packed representation of `Option<(Nonce<StorageNonce>, IngredientIndex)>`
// allowing us to avoid a lock in favor of an atomic load. This works thanks to `Nonce`
// having a niche and so the entire type can fit into a u64.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// This is a packed representation of `Option<(Nonce<StorageNonce>, IngredientIndex)>`
// allowing us to avoid a lock in favor of an atomic load. This works thanks to `Nonce`
// having a niche and so the entire type can fit into a u64.
// A packed representation of `Option<(Nonce<StorageNonce>, IngredientIndex)>`.
//
// This allows us to replace a lock in favor of an atomic load. This works thanks to `Nonce`
// having a niche, which means so the entire type can fit into an `AtomicU64`.

Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

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

i think this looks good to me? the only note that i'd have is "it'd be nice to have a Loom/shuttle test for IngredientCache, but I think I committed to that...

@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch 2 times, most recently from 005375e to 3396a1a Compare February 17, 2025 12:13
@Veykril
Copy link
Member Author

Veykril commented Feb 17, 2025

Ye I'd push the test onto the rest of the Loom work. I don't think without Loom writing a test is too useful here right now Though we can also delay this until we have loom integrated, no preference from me.

@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch from 3396a1a to f2b1517 Compare February 20, 2025 13:41
@davidbarsky
Copy link
Contributor

I think we can/should merge this, but codespeed is reporting 1–2% regressions. do you happen to why they're showing up?

@Veykril
Copy link
Member Author

Veykril commented Feb 20, 2025

I don't know why, I'd expect this to not regress it. Maybe its just within noise

@MichaReiser
Copy link
Contributor

1-2% is something I consider noise.

@Veykril Veykril force-pushed the veykril/push-pwqsvzurlkun branch from f2b1517 to 6181ddf Compare February 21, 2025 06:26
@Veykril Veykril added this pull request to the merge queue Feb 21, 2025
@Veykril Veykril removed this pull request from the merge queue due to a manual request Feb 21, 2025
@Veykril Veykril added this pull request to the merge queue Feb 21, 2025
Merged via the queue into salsa-rs:master with commit 93b9cff Feb 21, 2025
9 checks passed
@Veykril Veykril deleted the veykril/push-pwqsvzurlkun branch February 21, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants