This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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]

RE[2]: is_mp(), sysconf, and atoi. (Statically-linked multithreaded app s broken on X86?)


Hi Hans,

>Is there a stylistic reason to prefer this one?
>
>I would have said that it doesn't matter much which one you choose.  If the index version doesn't generate essentially the same code as the pointer version at -O2, then the optimizer has a problem.  So I 
think it really is purely a readability issue.  (Also this routine runs either once or twice at startup, and never thereafter.)

I won't waste your time with this any further. It was an off-the-cuff reflection and your
comments about the optimizer are correct. I thought my version was pretty in a K&R kind
of way and since I'm not used to thinking in terms of optimizing compilers, my irrational,
inner child fretted about what the TRS-80 BASIC interpreter would do when it hit
stat_buf[j] 3 times :).

Thanks for taking the time to reply to me.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]