in reply to Re^7: [OT] LLP64 .v. LP64 portability
in thread [OT] LLP64 .v. LP64 portability
I wasn't limiting my ambitions to simplifying just pp_substr, but ridding the sources of the 1302 size mismatches in 73 files under Win64. Many of these come about because values extracted from IVs are assigned to or mixed with STRLEN values.
While casts cost nothing in runtime performance, adding all the pre-cast checks to ensure nothing will be lost does. And in 99% of cases totally unnecessarily.
Update: By which I mean, if STRLEN has to be cast to size_t when calling memcpy or strlen, it costs nothing because a (positive) signed N-bit integer will always fit in an unsigned N-bit integer regardless and mean the same thing. So no pre-cast checks required.
The essence of good software engineering is not the code you write, but the code you avoid writing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: [OT] LLP64 .v. LP64 portability
by ikegami (Patriarch) on Apr 22, 2010 at 06:29 UTC | |
by BrowserUk (Patriarch) on Apr 23, 2010 at 05:51 UTC | |
by ikegami (Patriarch) on Apr 23, 2010 at 06:04 UTC | |
by ikegami (Patriarch) on Apr 23, 2010 at 06:06 UTC | |
by ikegami (Patriarch) on Apr 23, 2010 at 06:07 UTC |