m03 · Burst · unit quiz · 14 min
Unit — Burst
01why
State the single principle that explains why Burst compiles a subset of C# and why that subset is fast.
02why
Why does the SoA chunk layout from Module 1 do double duty for Burst?
03why
Aliasing is 'can two pointers overlap?' Why is Burst's no-alias-by-default both its speed advantage and its most dangerous footgun?
04how
Which loop-body element does NOT silently prevent vectorization?
05why
A Burst benchmark reports an impossibly fast result. Name the cause and the fix in one.
06howmeasure
Build the Burst-vs-no-Burst comparison from the lab (same vectorizable loop, [BurstCompile] on vs off, warmed up, DCE defeated). Enter time_noBurst / time_Burst.
▸ Run one vectorizable IJob loop over a large array with [BurstCompile] present, then removed. Warm up, take a median of many timed runs, ensure the result is stored (not DCE'd). Enter the ratio time_noBurst / time_Burst.
07howmeasure
Now isolate vectorization: keep Burst on for both, add an inter-iteration carry to force scalar in one. Enter time_scalarForced / time_clean.
▸ Two Burst IJob loops over the same-size array: one clean/independent, one with a serialized carry (e.g. acc depends on the previous acc). Both store their result. Warm up, median many runs. Enter time_scalarForced / time_clean.
your notes
stored in this browser · syncs when you sign in