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

It costs cycles to call a C function. I seem angry and bitter all the time. But my point is just, there's an argument in favor of scasb.


So you're comparing inlined rep scasb, with non-inlined alternative. Interesting comparison I guess.

Sure, it would bloat the code a little to inline the optimized version, but it could be done in tight inner loops if required.


I'm assuming you're not inlining a function with a loop in it, but OK, you can also just expand the 7 insns everywhere you call strlen.




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

Search: