Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lukefleed
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
1.
▲
Who Owns the Memory? Part 2: Who Calls Free?
(lukefleed.xyz)
10 points
by
lukefleed
9mo ago
|
0 comments
2.
▲
Who Owns the Memory? Part 1: What Is an Object?
(lukefleed.xyz)
12 points
by
lukefleed
9mo ago
|
1 comments
3.
▲
by
lukefleed
10mo ago
That's an interesting question. I don't have too much experience, but here's my two cents. For matrix function approximations, loss of orthogonality matters less than for eigenvalue computations. The three-term recurrence mai
4.
▲
by
lukefleed
10mo ago
Thanks! I used perf to look at cache miss rates and memory bandwidth during runs. The measurements showed the pattern I expected, but I didn't do a rigorous profiling study (different cache sizes, controlled benchmarks across architec
5.
▲
by
lukefleed
10mo ago
Thanks!! I'm currently working on expanding that work. I will post something for sure when it's done.
6.
▲
by
lukefleed
10mo ago
Sorry for the late answer. The blog post is a simplification of the actual work; you can check out the full report here [1], where I also reference the literature about this algorithm. On the cache effects: I haven't seen this "en
7.
▲
by
lukefleed
10mo ago
Hi there, thanks! I started doing this for a university exam and got carried away a bit. Regarding Rust for numerical linear algebra, I kinda agree with you. I think that theoretically, its a great language for writing low-level "high-
8.
▲
Cache-friendly, low-memory Lanczos algorithm in Rust
(lukefleed.xyz)
141 points
by
lukefleed
10mo ago
|
22 comments
9.
▲
by
lukefleed
1y ago
For many applications, casting to u16 and wasting 6 bits is perfectly fine. The "trouble" is only worth it when you're operating at a scale where those wasted bits add up to gigabytes. This is common in fields like bioinforma
10.
▲
by
lukefleed
1y ago
It's not about poorer instructions; a get_unchecked on a Vec<u8> is just a single memory access, which is as good as it gets. The difference is likely down to cache locality effects created by the benchmark loop itself. The bench
11.
▲
by
lukefleed
1y ago
The other replies nailed it, but I'll add my two cents. Vec<u8> may be the right call most of the time for most use cases. This library, however, is for when even 8 bits compared to 4 is too much. Another example, if all your val
12.
▲
by
lukefleed
1y ago
That's a good catch!! Thank you, you are right. I (incorrectly) assumed that a single u64 could capture the entire bit_width-value read starting from byte_pos. However, as you said, this assumption breaks for some large bit widths. I a
13.
▲
by
lukefleed
1y ago
BEXTR basically does the same thing, yes. I'm sticking with the portable shift-and-mask, though. My bet is that LLVM is smart enough to see that pattern and emit a BEXTR on its own when the target supports BMI1. Using the intrinsic dir
14.
▲
Engineering a fixed-width bit-packed integer vector in Rust
(lukefleed.xyz)
89 points
by
lukefleed
1y ago
|
21 comments