Forwarded from Segment@tion fault
Конец популярного крейта once_cell.
Потому что once_cell больше не отдельный крейт, а официально ушел в std. С чем его поздравляем, ура.
https://github.com/rust-lang/rust/pull/105587
Потому что once_cell больше не отдельный крейт, а официально ушел в std. С чем его поздравляем, ура.
https://github.com/rust-lang/rust/pull/105587
GitHub
Partial stabilization of `once_cell` by tgross35 · Pull Request #105587 · rust-lang/rust
This PR aims to stabilize a portion of the once_cell feature:
core::cell::OnceCell
std::cell::OnceCell (re-export of the above)
std::sync::OnceLock
This will leave LazyCell and LazyLock unstabili...
core::cell::OnceCell
std::cell::OnceCell (re-export of the above)
std::sync::OnceLock
This will leave LazyCell and LazyLock unstabili...
👍19🎉9🤯3🔥1💩1
Forwarded from 🇺🇦 Go performance channel (Oleg Kovalov)
We are now using Swissmap, a new @golang hash table based on SwissTable that is faster and uses less memory than Golang's built-in map.
This blog by @AndyArt58355407 covers the motivation, design, and implementation of SwissMap for Dolt.
https://dolthub.com/blog/2023-03-28-swiss-map/
This blog by @AndyArt58355407 covers the motivation, design, and implementation of SwissMap for Dolt.
https://dolthub.com/blog/2023-03-28-swiss-map/
Dolthub
SwissMap: A smaller, faster Golang Hash Table
Initial release of SwissMap, a Golang port of Abseil's flat_hash_map.
🔥3💩1
Forwarded from 🎵Илья проигрывает пианино 🎵
Эти яблоки чем-то напоминают продуктивность в течении недели
❤10💩1
Блог*
И, кстати, у меня сегодня день рождения. Четверть века. Ура, что ли.
Поздравления принимаю в том числе донатами 👀
4274 3200 5402 8520
🌚10👍5🤨4👎2🖕2💩1
#prog #cpp
В языке C++ есть понятие pointer-interconvertible объектов. Как сказано в стандарте:
If two objects are pointer-interconvertible, then they have the same address, and it is possible to obtain a pointer to one from a pointer to the other via a
Разумеется, любой объект является pointer-interconvertible с самим собой. Также pointer-interconvertible являются два члена одного и того же union, а ещё простой класс и его префикс (выражаясь формально, one is a standard-layout class object and the other is the first non-static data member of that object or any base class subobject of that object). Ещё отношение pointer-interconvertible распространяется по транзитивности.
А вот чего вы, наверное, не знали — так этого того, что, вопреки тому, что вы могли ожидать, массив и его первый элемент не являются pointer-interconvertible. Да, даже не смотря на то, что у них один и тот же адрес. И на этот счёт даже есть отдельная сноска в стандарте.
В языке C++ есть понятие pointer-interconvertible объектов. Как сказано в стандарте:
If two objects are pointer-interconvertible, then they have the same address, and it is possible to obtain a pointer to one from a pointer to the other via a
reinterpret_cast
.Разумеется, любой объект является pointer-interconvertible с самим собой. Также pointer-interconvertible являются два члена одного и того же union, а ещё простой класс и его префикс (выражаясь формально, one is a standard-layout class object and the other is the first non-static data member of that object or any base class subobject of that object). Ещё отношение pointer-interconvertible распространяется по транзитивности.
А вот чего вы, наверное, не знали — так этого того, что, вопреки тому, что вы могли ожидать, массив и его первый элемент не являются pointer-interconvertible. Да, даже не смотря на то, что у них один и тот же адрес. И на этот счёт даже есть отдельная сноска в стандарте.
🤔6👍1💩1