Submit and pass all tests to enable saving to GitHub.
Implementation
Why This Matters
BLAS and LAPACK numerical libraries, along with image codecs like libjpeg-turbo, mark their hot-loop pointer parameters __restrict__ specifically because without it the compiler must conservatively reload from memory on every iteration, blocking the auto-vectorization that turns a scalar loop into AVX code processing 8 floats per instruction. This is also exactly the guarantee Rust's borrow checker enforces at the language level by construction, which is why safe Rust code vectorizes as well as hand-annotated C without needing this keyword at all.
Hints
0 / 3 revealed
Sample validation
Sample case for Run. Submit grades this sample plus all hidden tests.
main.c
Workspace 1.0
Demonstrate restrict qualifier with performance comparison.
Requirements:
Implement array addition without restrict
Implement same function with restrict on all pointers
Show assembly code difference
Demonstrate vectorization with restrict
Measure performance improvement (20-40% speedup)
Explain alias analysis
Show when restrict is safe to use
Test with overlapping arrays (show undefined behavior)