tower120 / hi_sparse_array Goto Github PK
View Code? Open in Web Editor NEWWIP
WIP
Basically try to use LevelMasksIter instead of LevelMasks.
Benchmark contains/data_mask for reduce specifically - since that could potentially bring overhead.
Fold
can work with non-Cloneable iterator that produce values or references.
We already store references to Iterator
Item
s in fold
's state. We can store Iterator Items in Fold
instead. This will make Fold big though.
That could be done through [Level;N]
, using PassThrough
, using some kind of Tuple<impl Level>
.
Also some specialization of LevelMasksIter
required since get_data...
accept last hierarchy level block meta, as input.
All of this requires better meta-programming support from the Rust side. Namely - specialization.
I can't come up with compile-time configurable depth level in current Rust state, without making lib
unreadable. But this is probably doable with macros, or just by re-implementing Array N times, for each
level count.
This rust-lang/rust#122055 should appear in Rust 1.79
We could try to return Borrow
in LevelMasks instead of value.
This should allow to remove Clone
constraint from BitBlock
.
UPDATE. It turns out that we need more robust GAT support from Rust as well. for<'a>
does not work in places where we need it.
SparseHierarchy::get
can return Empty DataBlock, if index outside range, instead of Option None.
To do this we probably need to add SparseHierarchy::empty_data_block(&self) -> Self::DataBlock<'_>
.
This will make SparseHierarchy
interface more complex, and benefits are currently unclear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.