-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write-locked graph storage implementation for faster bulk loaders (#1741
) * write locked graph implementation * wip implementing edge resolution * load_edges_from_df is passing all tests in rust with new implementation * fix warnings * don't hit the map so hard * track the time updates on node and graph * fix warning * move the buffers out of the loop and don't allocate storage for edge properties if there are none * resolution improvements in the batch loader * remove unused iter in NodeColOps trait as it was slower than calling get * remove unused imports * fmt * get the lock outside the loop * add cache to df loaders * add proptest for df loader * add test for cache and fix silly bug * clean up unused resolve_node_no_init and update bytemuck version * new is not used again
- Loading branch information
1 parent
b317933
commit 51bb68c
Showing
38 changed files
with
1,005 additions
and
205 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pometry-storage-private
updated
from 942230 to f94a7e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use std::sync::atomic::{AtomicU64, AtomicUsize}; | ||
|
||
/// Construct atomic slice from mut slice (reimplementation of currently unstable feature) | ||
#[inline] | ||
pub fn atomic_usize_from_mut_slice(v: &mut [usize]) -> &mut [AtomicUsize] { | ||
use std::mem::align_of; | ||
let [] = [(); align_of::<AtomicUsize>() - align_of::<usize>()]; | ||
// SAFETY: | ||
// - the mutable reference guarantees unique ownership. | ||
// - the alignment of `usize` and `AtomicUsize` is the | ||
// same, as verified above. | ||
unsafe { &mut *(v as *mut [usize] as *mut [AtomicUsize]) } | ||
} | ||
|
||
#[inline] | ||
pub fn atomic_u64_from_mut_slice(v: &mut [u64]) -> &mut [AtomicU64] { | ||
use std::mem::align_of; | ||
let [] = [(); align_of::<AtomicU64>() - align_of::<u64>()]; | ||
// SAFETY: | ||
// - the mutable reference guarantees unique ownership. | ||
// - the alignment of `u64` and `AtomicU64` is the | ||
// same, as verified above. | ||
unsafe { &mut *(v as *mut [u64] as *mut [AtomicU64]) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pub mod atomic_extra; | ||
pub mod core; | ||
|
||
#[cfg(feature = "python")] | ||
pub mod python; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.