unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.39k stars 180 forks source link

Experiment with putting most of potential_passthrough_impl in an cold function #4858

Open hsivonen opened 7 months ago

hsivonen commented 7 months ago

potential_passthrough_impl starts with the remark

// This methods looks badly branchy, but most characters
// take the first return.

Experiment with delegating the rest of the function after the first check to a second function marked cold.

sffc commented 4 months ago

@hsivonen This looks like internal cleanup, correct? If it impacts data struct stability, we could do it sooner.

hsivonen commented 3 months ago

This is an internal change, yes.