facebook / fishhook

A library that enables dynamically rebinding symbols in Mach-O binaries running on iOS.
BSD 3-Clause "New" or "Revised" License
5.18k stars 966 forks source link

Move symol length check out of rebinding loop #27

Closed kastiglione closed 8 years ago

kastiglione commented 8 years ago

The symbol length check is loop invariant code, and so can be done once before looping over the rebindings. Also, replaces str_longer with strnlen.

This optimization was the work of @ocrickard in #26.

ocrickard commented 8 years ago

Omg thank you!

grp commented 8 years ago

Yay!