[Rust Programming] Advent of Code 2023 - Day 13 - Point of Incidence

preview_player
Показать описание
My Rust solution for Day 13 of Advent of Code 2023.

#aoc #adventofcode #adventofcode2023 #rust #rustlang #aoc2023
Рекомендации по теме
Комментарии
Автор

I <3 your videos, greetings from Cuba

BasedOutfits
Автор

Note that these days with SIMD available, compressing a boolean field into bitvectors isn't that effective any more. Comparing sequencse of bytes is almost as fast these days as comparing to u64s, and in this problem only rows can be compared that efficient. The bit comparison operations on columns (or the computation of a rotated bitfield) eat up any advantage of the bitfields. I must know, as I tried and measured the result. Operating on the bytes of the input as they are is faster. Vec<&str> for each field is all one needs. And then treating the &str as byte sequences (not char sequences) by using as_:bytes().

olafschluter
welcome to shbcf.ru