News for hackers. Stuff that matters.
Re:A fun optimization trick from rsync by beefsack on Sunday October 28, 2018 @11:40PM (#18324889)
Sounds really clever, but also has the potential to be really opaque and confusing. On the other hand, the trick in the article is quite verbose.

Can be tricky balancing terseness with readability.

Re:A fun optimization trick from rsync by usefulcat on Monday October 29, 2018 @12:38AM (#18325100)
> has the potential to be really opaque and confusing

Yes, but.. compared to switch and preprocessor hacks described in the article? Granted it's subjective but I'd find a function pointer that's assigned to once to be way easier to comprehend.

Re:A fun optimization trick from rsync by carlmr on Monday October 29, 2018 @07:30AM (#18326570)
Yeah, I think both methods are somewhat opaque, and the one described here is opaque + hacky. I wouldn't let this through code review.
Re:A fun optimization trick from rsync by Sharlin on Monday October 29, 2018 @05:13AM (#18325983)
I would say that this switch hack is lightyears more "clever" (that is, opaque and confusing) than a simple function pointer.