This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
How about keeping the current semantics, but adding __builtin_expect so that the code is optimised to assume the difference won't be greater than INT_MAX or less than INT_MIN? Presumably on 32bit the builtin_expect(diff_type <= INT_MAX) would be equivalent to what we have now, but on 64bit would be no worse.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |