Others / shredder

Garbage collected smart pointers for Rust
MIT License
266 stars 9 forks source link

Add `ptr_eq` method for Gc and DerefGc #72

Closed Others closed 2 years ago

Others commented 2 years ago

For Gc this is more efficent than doing the comparison directly on GcGuards, as you avoid taking the internal lockout.

Others commented 2 years ago

@awestlake87 do you want to take a look at this? Should be a little more efficient than what you have now

awestlake87 commented 2 years ago

Looks good to me. I'm pretty new to this library, so I'm not familiar enough with the internals to know what's going on in chunked_11.rs, but pointer comparisons without acquiring the lock would definitely be a plus!