mikepound / opencubes

A community improved version of the polycubes project!
MIT License
44 stars 23 forks source link

Yet another Rust version. n=13 in 7mins. #15

Closed NailLegProcessorDivide closed 1 year ago

NailLegProcessorDivide commented 1 year ago

Still a lot of work to be done but felt like a good place to share. This will conflict with both the other existing rust PRs unfortunately.

Currently still quite slow with the only optimisations being to reduce the amount of rotations and hash set accesses by having a canonical orientation of each poly cube determined by DX <= DY <= DZ and then the minimum integer value of the bit set.

Other optimisation, threading and maybe vectorisation still to come.

Rotating the point lists is probably faster than rotating the bit sets any way so might try to switch to all point lists but point collisions is harder to detect.

I have a variety of feature flags set to enable and disable optimisations / diagnostics. currently cargo run --release --features "size16 smallset" -- 13 is fastest

Saving and loading cache files still to come as well hopefully