Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
My day 22 solution runs in <10ms: https://github.com/orlp/aoc2021/blob/master/src/bin/day22.rs
The trick I used was to represent signed volumes, compute the intersection and then store the 'negative cube' instead of splitting up cubes.
Is that the right day? My code for 2021:14 runs in 440 microseconds for both parts. 2021:23:2 is the only day I couldn't get under 1 second.
https://github.com/forrestthewoods/aoc2021/blob/master/rust/...
It's possible to simplify things using bitmaps: https://github.com/antirez/adventofcode2022/blob/main/day-3/...