Hi Felix, On Tue, 05 Jul 2011 13:12:25 +0200 (CEST) Felix <[email protected]> wrote:
> From: Mario Domenech Goulart <[email protected]> > Subject: [Chicken-hackers] -O3 and -unboxing > Date: Mon, 04 Jul 2011 18:05:26 -0400 > >> The docs (http://wiki.call-cc.org/man/4/Using%20the%20compiler) state >> that: >> >> -optimize-level 3 is equivalent to >> -optimize-leaf-routines -local -inline -inline-global -unboxing >> >> And that >> >> -unboxing >> try to use unboxed temporaries for numerical operations. This >> optimization is only effective in unsafe mode. >> >> >> Since -O3 doesn't use -unsafe and -unboxing is only effective in unsafe >> mode, is there any reason for adding -unboxing to level 3? > > It is there to enable unboxing if the user compiles in unsafe mode. Since > this may be declared with "(declare (not safe))", I found it convenient to > enable it anyway at this optimization level. I see. But if users compile their code with `-O3 -unsafe' (or -O3 and `(declare (not safe))' in code), wouldn't it be exactly the same as -O4, since: -O3: -optimize-leaf-routines -local -inline -inline-global -unboxing -O4: -optimize-leaf-routines -local -inline -inline-global -unboxing -unsafe ? It's not a big deal in the end, but my point is that if -unboxing is only effective when compiling in unsafe mode, and the only difference between -O3 and -O4 is exactly -unsafe, there's not much point in having -unboxing in -O3 when it would only be effective when you use -unsafe -- then that'd be the same as -O4. Unless I'm missing something, of course. As you can realize by now, this message is just about nitpicking to annoy you. Best wishes. Mario -- http://parenteses.org/mario _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
