Better HN
topnewbestaskshowjobs
Log inSign up

9fans

1 karma · joined Oct 27, 2018 (8y ago) · 1 submissions

Submissions

comment 8y ago · link · parent

The Plan 9 C compiler does perform optimisations including constant folding and dead code elimination. (Actually it's the linker which eliminates dead code, so it can remove functions which are not called from any other source file.) The example loop on the slide however was not dead code or useless: it was a timing delay loop, an idiom commonly encountered in OS kernels and embedded applications.