You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume I'm wrong here, asking for education mostly :)
The code looks like this:
/// Recommended node size of a given B-Tree
@inlinable
@inline(__always)
internal static var defaultLeafCapacity: Int {
#if DEBUG
return 5
#else
let capacityInBytes = 2000
return Swift.min(16, capacityInBytes / MemoryLayout<Key>.stride)
#endif
}
From my reading the max leaf capacity is 16? Is that right? I would expect (without really understanding much of the code here) performance to be better if leaves could contain more then 16 elements when element size is small.
The text was updated successfully, but these errors were encountered:
Hm, I think so -- it looks like this should use Swift.max, not Swift.min. The capacity in bytes also looks a little low to me -- we'll probably want to increase it to something like 16kiB or so as part of the performance work that'll precede its release.
(Beware, the SortedCollections module is not yet ready for production use, and its API may see source-breaking changes before it ships.)
I assume I'm wrong here, asking for education mostly :)
The code looks like this:
From my reading the max leaf capacity is 16? Is that right? I would expect (without really understanding much of the code here) performance to be better if leaves could contain more then 16 elements when element size is small.
The text was updated successfully, but these errors were encountered: