duck's Avatar

duck

@quack

Low-level bit twiddler. CS @ UNC

67
Followers
180
Following
13
Posts
22.06.2023
Joined
Posts Following

Latest posts by duck @quack

Preview
Slower Memory Zeroing Through Parallelism While investigating some performance mysteries in Chrome I discovered that Microsoft had parallelized how they zero memory, and in some cases this was making it a lot slower. This slowdown may be mโ€ฆ

Years ago I complained about Windows creating 39+ page-zeroing pages on 96-core machines, which made memory zeroing much slower. The vast majority of the CPU time was consumed by fighting over a lock.

randomascii.wordpress.com/2022/07/11/s...

29.11.2025 07:53 ๐Ÿ‘ 25 ๐Ÿ” 5 ๐Ÿ’ฌ 3 ๐Ÿ“Œ 0

This is all to say OCamlโ€™s memory model is very cool and the authors thought a lot into how to make it performant and sound! Itโ€™s an interesting area

24.06.2025 12:58 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

But from what I can find ldapr is just an alias for ldar on M-series so RCsc hasnโ€™t been beneficial on those platforms (I kind of want to verify this with benchmarks too)

23.06.2025 20:07 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

I got to read through the paper on OCamlโ€™s memory model again and as a project I was wondering if we could replace ldar with ldapr on arm64 platforms but unfortunately atomic writes are lowered compare-and-exchanges and regular stores are simply str unless you have M2

23.06.2025 20:07 ๐Ÿ‘ 3 ๐Ÿ” 1 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

At an internship-of-sorts and access to GPUs for some of this DL work Iโ€™m working on has been delayed, which makes it difficult to make any progress. Iโ€™m staying optimistic though, because I think this is potentially novel and itโ€™d be a shame if it couldnโ€™t get done in my limited time here :(

20.06.2024 08:33 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

This work will hopefully be a blogpost soon. I think the idea of an Rust allocator making use of sized deallocation hasnโ€™t been properly exploredโ€”because itโ€™s focused towards safe Rust users, I can forego security features that are found in modern C malloc implementations

07.01.2024 14:02 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

The per-location tracking of tree borrows is necessary to be able to use references in a sane way at all without prolific, infectious use of raw pointers that eliminate the utility of the borrow checker. Iโ€™d really like to see tree borrows model see wider adoption, especially for allocator authors.

07.01.2024 04:51 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Been working on the Rust allocator recently; ended up delving into the aliasing model with stacked/tree borrows. Itโ€™s difficult to write sound multithreaded code with references in the presence of raw pointers, and the lack of view types make for unergonomic code under the strict stacked borrowsโ€ฆ

07.01.2024 04:38 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Merry Christmas!

25.12.2023 05:27 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

ๆ‰“็ฎ—ๅญฆไน ๅฅฅๆ–ฏๆœฌ็š„ใ€Šๅšๅผˆ่ฎบๆ•™็จ‹ใ€‹๏ผŒ็ฅๆˆ‘ๅฅฝ่ฟ

22.10.2023 00:49 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

ๅœจๅญฆๆ กๆ นๆœฌๅฐฑๆฒกๆ—ถ้—ด็Žฉไน ๐Ÿ˜”

17.08.2023 01:28 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I think I ultimately want to pursue cryptography and by extension, mathematics. Iโ€™m just not sure how to reconcile that with my interests in security in general. It would be nice if I had the time to seriously get into pwn like some of the people I look up to ๐Ÿ™‚

10.08.2023 18:01 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

ๅพˆๅฟซๅฐฑๅผ€ๅญฆไบ†๏ผŒๅฏๆ˜ฏๆˆ‘ๆฒกๆœ‰ๆ€Žไนˆ่ฏปๆˆ‘็š„ๆ•ฐๅญฆ่ฏพๆœฌ๏ผŒๅชๅœจ็ฌฌๅ››็ซ ใ€‚

ๆ˜Žๅนดๅฐฑๅผ€ๅง‹็”ณ่ฏทๅคงๅญฆไบ†๏ผŒ็œŸ็š„ๆœ‰็‚น็ดงๅผ ใ€‚

10.08.2023 17:55 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Think Iโ€™ll try screaming into the void here but in simplified Chinese

22.06.2023 21:03 ๐Ÿ‘ 5 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0