Make existing code run faster, with compiler optimizations.

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

ความคิดเห็น • 14

  • @xnehaxixh
    @xnehaxixh 4 ปีที่แล้ว +11

    Man! These videos are helpful. Its not often you come across these resourceful videos as a learner or a student.

  • @alexandersage967
    @alexandersage967 ปีที่แล้ว +1

    So straightforward and clear. Perfect

  • @antonioastorino7488
    @antonioastorino7488 4 ปีที่แล้ว +4

    Thank you, Jacob. Nice, concise, and useful!

  • @tejassonawdekar
    @tejassonawdekar 5 ปีที่แล้ว +6

    What platform are you using to compile and run the programs?
    I use code blocks. How can I check the speed/ execution time and is the a better metric like mips that can be seen here?

    • @JacobSorber
      @JacobSorber  5 ปีที่แล้ว +11

      I don't typically use an IDE. Just a text editor, build system (like make), and my compilation tools, all from the terminal. I explained this a bit more in a previous video (th-cam.com/video/Pqf6H1WSbeY/w-d-xo.html).
      I also have a video that goes over a few option for timing code. th-cam.com/video/1KQqpiXxvWQ/w-d-xo.html
      Hope that helps.

    • @marksladen2901
      @marksladen2901 4 ปีที่แล้ว +10

      For Windows, CodeBlocks probably installed GCC using Mingw. You might need to put GCC into your system path in the Windows Environment variables. Then you can use the command prompt to compile.
      Yes, I know this is a year after you left your comment. Maybe this will help someone else.

  • @d3stinYwOw
    @d3stinYwOw 4 ปีที่แล้ว +4

    Nice! There's Os flag to make code smaller and Og to optimize for debug(?) :)

  • @russellquadros2948
    @russellquadros2948 2 ปีที่แล้ว +1

    Amazingly useful!

  • @MrRenanwill
    @MrRenanwill 3 ปีที่แล้ว +1

    I will test It with my window manager source code (dwm). It makes sense to make It faster. It already uses "-Os" flag but I am using "-O2" to see If It is faster. Looks nice up to now -- the first 10 minutes hahahah .

    • @MrRenanwill
      @MrRenanwill 3 ปีที่แล้ว

      P.S.: I have encountered some problems with full-screen float windows, unfortunately. If you do not own the code or understands its mechanisms, do not make anything in the Makefile. You could, but there is a chance of the code not working, as in my case.

  • @kaushikjames5623
    @kaushikjames5623 2 ปีที่แล้ว +1

    superrrrrrrrrrrr da motta

  • @Israel213
    @Israel213 ปีที่แล้ว

    Good, but you forgot -O4 and -Os.

    • @marbens
      @marbens 10 หลายเดือนก่อน

      -O4 and above on the compilers mentioned are just equivalent to -O3