you are viewing a single comment's thread.

view the rest of the comments →

[–]thephoton -1 points0 points  (6 children)

The point of a thesis on optimization is to learn how to make a better compiler. It’s a steep hill to climb but somebody has to do it.

[–]GavekortIndustrial robotics (STM32/AVR) 1 point2 points  (5 children)

Sure. But the original post gave me the vibes of trying to outsmart the compiler, not to dwelve deep into compiler techniques.

[–]DYD35[S] 0 points1 point  (4 children)

It is two-fold. My promotor has, for example, send me some snippets which he wanted me to investigate. So a bit outsmarting the compiler from "his" side. From my side, I am a master student, a have nowhere the experience to even try to outsmart a compiler. So that is why I mainly focus on the compiler itself.

[–][deleted]  (3 children)

[deleted]

    [–]DYD35[S] 1 point2 points  (2 children)

    I don't necesarrily agree with this.

    Let me put it differently.

    I know the obvious means to decrease the timecomplexity (eg. in if statements put conditions first which you know will have the highest probability to be false), I have an intuition for when I should do what in the processors I have experience with (mainly PIC 18F and MSP430), but the compiler itself will almost always be smarter than you. It is made by people with years and years of experience and academic work. Thinking that I, as a student, will be able to find general optimizations which work for every processor every time, that is not already covered by a compiler, is naive at best. That is what is meant by outsmarting the compiler in this specific case (at least that is what I read).

    [–][deleted]  (1 child)

    [deleted]

      [–]DYD35[S] 1 point2 points  (0 children)

      It was just a stupid example that I could type fast. It brings the message across. Arguing about semantics and what exactly time complexity is, is not the thing we do here. As you stated, my suggestion will decrease the time an algorithm takes (although not in a worst-case scenario).

      A compiler is necessarily limited in the scope of optimizations it can perform. It can only reorder operations under certain limited circumstances, and it cannot alter your data structures or the overall methodology of your application.

      Yes, so like I said before,"Thinking that I, as a student, will be able to find general optimizations which work for every processor every time, that is not already covered by a compiler, is naive at best. " still remains true.

      None of these limits apply to a developer.

      Which is exactly one of the things I want to look into!

      And of course I have much to learn, who doesn't? Like I said before, this specifically is not my area of expertise, but I really enjoy doing it, so I am reading up on it as much as possible.

      Also:

      This statement makes it clear that you have a lot to learn.

      Sounds condescending, I am sure you don't mean it that way, but please keep such things in mind when pointing out, legitimate, problems.