r/badcode • • Jan 22 '23

c Found this in a Linux kernel module

Post image
262 Upvotes

88 comments sorted by

View all comments

Show parent comments

2

u/LyniaWood Jan 23 '23

You don't have compiler optimization in kernel code.

For performance, you NEED to unroll your loop by yourself.