Re: Prioritize Performance over Correctness
[email protected] (Steven M. O'Neill) Tue, 28 Jul 2026 21:35:55 -0000 (UTC)
| Newsgroups | alt.ascii-art |
|---|---|
| Organization | The process of turning a pinto bean into a kidney |
| Message-ID | <[email protected]> |
Pardon the top-posting. Just wanted to let you know that this didn't display well on my particular setup, as my newsreading software is set up to wrap at around 80 columns. IIRC this is (or used to be at least) the accepted limit for line lengths. Full message quoted below, which should explain what I mean. Here's what 80 columns look like: 12345678901234567890123456789012345678901234567890123456789012345678901234567890 HTH. Also, I changed the newsgroups to just alt.ascii-art Johann 'Myrkraverk' Oskarsson <[email protected]> wrote: >On 28/07/2026 3:58 AM, Keith Thompson wrote: > >> >> You'd have to create a compiler, or modify an existing one, to use a >> non-zero representation for null pointers. That's hardly "trivial". >> (For example, default initialization for static objects could no >> longer just zero the target object.) > > __ .----.__ >.________________________________________. > -' `/(#)#(#) `- . o O ( I tend to assume people are more >capable ) > ` (#)#(#) \ ___ ^( than they actually are, because >it )^^ > __( \ ,,,/ `. ``. ( makes them either feel better, >or some- ) > / \ \,-/ | \ ( times they rise to the challenge! >)^^^^^^ > | `-- ( ( /__ ( ^^^( )^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > ` ( `---\ `---._` ( } (^^ >^^)______________________________. > | | \ `----._`.`. .' ( For instance, this is an old >ASCII art ) > . ( `-) \ `. )) ) | ( horror I made several years ago. > )^^^ > / \ / / ) / { ( I got semi-famous for my >collection ) > / \ / ( | ( ( of non-trivial ASCII art. >)^^^^^^^^^^ > / ,\ /\\\ ( |_ \ ( And I made all of it by hand, >including ) > / /\( ) / .`\\\ ^^( this thought bubble. >)^^^^^^^^^^^^^^ > \\/ \ .-' | | -_ ^^^^^^^^^^^^^^^^^^^^^^^ > \ .'___( ) \ `-. > -' \/\___\\__\ > >/** Do you ever mix C and ASCII art? **/ > >int main( int _, char *o[] ) { return _^( int ) main <3 ; } > > >> >> I don't think there are any modern C compilers that don't use >> all-bits-zero for null pointers. Other representations are of >> course valid, but tend not to be worth the trouble. >> >> I wouldn't be terribly surprised if a future standard mandated >> all-bits-zero for null pointers -- or if it didn't. >> > >I think more of it like an arm-chair thought exercise. The issue >isn't the bit pattern at all, but how you're going to treat conversion >to integers. Especially in this context, > > if ( p ) { ... } > >a 64bit p with the pattern 0x..00000000 isn't supposed to be false, >when truncated to an integer. If I remember the standard(s) >correctly, p here is supposed to "devolve" into either 1 or 0 in a >boolean context. I'd believe comparing to zero, and use the Z flag is >normal in x64, and in MIPS64, direct comparison to $zero is probably >the most normal way to go about it. > I forgot the actual instructions in both cases. They're easy to >look up anyway. > >-- >Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ >I'm not from the Internet, I just work there. | via Easynews.com -- Steven O'Neill [email protected] Brooklyn, NY http://www.panix.com/~steveo