Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The inverse problem is here too:

> int partition_branchless(int* arr, int low, int high) {... for (int j = low; j < high; j++) { ... }... }

That for loop is just a sugared while loop which is just a sugared cmp and jmp



The articleesays that it optimizes just the inside of the loop (the loop jump can be optimized via unrolling, which the compiler may do automatically).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: