Hacker Newsnew | past | comments | ask | show | jobs | submit | lephyrius's commentslogin

"generally you want -O2"

I see this a lot shouldn't O3 produce better optimizations? Is that people have large codebases? OR is it that O3 does some CPU/memory tradeoffs? OR something else?


Sometimes -O3 produces slower code than -O2. Sometimes it produces incorrect code.

I usually compile with -O2 and annotate certain functions with O3 - if it looks like vectorization will give the function a boost.


To be honest I don't understand why isn't -O2 the default. Also does anyone ever use -O1?!


-O1 is good for debugger compatibility, and for avoiding compiler bugs at higher levels.


with out RTFA -O3 is where a lot of the weird compiler deciding it's smarter than you optimizations come in, and most of the time it is smarter than you and sometimes it introduces weird behavior.

ALSO it generally produces a larger binary which means less of it fits in the cache. I know a while back it was often suggested to try O3 and OS because often OS ended up being faster.


So does this mean that this pull request isn't accepted? https://github.com/rails/rails/pull/19272

Why release a beta if it's just an alpha? All the features isn't there. Why have this [temp] milestone? https://github.com/rails/rails/milestones/5.0.0%20%5Btemp%5D


Hi, I'm the author of the pull request. The pull request got stuck due to an issue with dynamic injection of local variables into view templates. (Explained more in the Aaron Patterson's RailsConf keynote[1]). We were planning to solve this issue before (potentially) merging the feature.

At the moment, it looks like the issue is solvable, and I have code that seems to solve it but still needs some refinement before I can submit a pull request about it.

I don't know what the Rails core team is planning about the feature, but considering how complex the whole thing is and how much there's still left to do, I'd guess that it won't make it to 5.0.

[1]: https://www.youtube.com/watch?v=B3gYklsN9uc&feature=youtu.be...


I see that it's an issue. But the places you use locals in a template is small. Majority of the templates would still benefit. Like the main layout and so on.


No, partial updates of materialized views it seems like.


nope. but since 9.4 you can at least update them without an exclusive lock on them.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: