Anonymous
klimi
oh....
Pavel
Is it correct that I can't use std::thread in my app on gcc on Linux if pthread is not linked?
Dima
/warn ot
Noor
#linux, what ide youre using?
Dima
CLion
Dima
qt creator
Palinuro
#linux, what ide youre using?
i mostly use vscodium.com for advanced things or spacemacs/neovim for smaller or remote stuff but i consider qtcreator one of the most advanced environments ever used for c/cpp/qt/qml
Mateo
Hi, I have a compute intensive c program to optimize that I will probably end up compiling with -O3, but for optimizing it I need to read its assembly output, the problem is O3 assembly is difficult to read compared to say O1. Is it viable that optimizations made over O1 will translate over O3 just as good? Or will I be wasting time as O3 will probably already be optimizing those
Asad
#linux, what ide youre using?
Switch to Windows and use Visual Studio.
Asad
Period.
Noor
Switch to Windows and use Visual Studio.
I hate the update system it wasting resources
Palinuro
Hi, I have a compute intensive c program to optimize that I will probably end up compiling with -O3, but for optimizing it I need to read its assembly output, the problem is O3 assembly is difficult to read compared to say O1. Is it viable that optimizations made over O1 will translate over O3 just as good? Or will I be wasting time as O3 will probably already be optimizing those
usually the compiler knows better than you how to optimize things (i said usually) try to embed the proper intrinsics and optimizations on O1, port them in your code, re-compile it with O3 and see what happens just please make sure to optimize only task intensive things without destroying the actual structure flow of the program, or the compiler optimizations may give you some unwanted surprises
Palinuro
I hate the update system it wasting resources
first of all, why do you need an alternative? maybe we can suggest you something better if we understand what "better" means for you and your use cases
Asad
Visual Studio is the perfect IDE.
Asad
people who criticize Windows or Visual Studio are living in the past.
Dima
Windows is awful
Dima
VS is slow and bulky
Dima
*was
It is
Dima
Now
Asad
in 95
Palinuro
people who criticize Windows or Visual Studio are living in the past.
i use vscodium and i've used clion and visual studio in the past, and i wanted to set that fucking shit on fire with all my heart
Palinuro
clion is way better if you have money and hardware resources to waste
Asad
VS is slow and bulky
depends on your hardware
Asad
It is
what do you use?
Palinuro
well, actually clion is very lightweight compared to VS, and its debugger and profiler are the best thing i've ever seen
Dima
depends on your hardware
I mean VS and its cache takes much more space on my ssd
Dima
I stopped using windows in 2012 and moved to Mac/Linux lol
Asad
try Windows 10
Palinuro
it has been 8 years bro. i said that.
i continue to lurk at it regularly on every new release
Palinuro
So it would be better not to use O3 but the explicit flags, seems reasonable :p
but if you do it properly, you can then re-enable O3 or at least O2 later
Francisco
So it would be better not to use O3 but the explicit flags, seems reasonable :p
You can use O3, but always test and measure. That way you'll get the most out of your CPU
Mateo
On the ide wars, I just would like to point out that you can’t use visual studio without a Microsoft account, it doesnt have proper multicursor support, it is so bloated that it installs an installer that in turns installs the ide, its size is at least five times other editors, the integration with git is pretty Bad compared to atom or vscode, and those are just some of the thing that make me avoid visual studio
Asad
i continue to lurk at it regularly on every new release
i don't wanna argue about MacOS. however, in almost all of the cases, Windows has its edge over Linux.
Mateo
Francisco
My main concern is doing work that will be done already by O3
Don't be. Just think that the compiler is smart enough to, for example, turn a *= 2; into a <<= 1;. And that is pretty easy, but there're really crazy optimizations a compiler can do and almost no human could
Mateo
it does not force you to update. other lightweight IDEs are good, too. but, VS is worthy.
I keep hearing that it has some neat feature underneat all the junk, and it probably has, but at the time it never clicked for me
Mateo
Just focus on the algorithmic complexity and and write clear code you can understand later
My main task is to optimize the program like this, not algorithmically. For example, O3 didnt recognize that a nested for loop was being traversed by column instead of by row thus generating lots of cache misses
Mateo
Just by that the program improved by 20%
Francisco
My main task is to optimize the program like this, not algorithmically. For example, O3 didnt recognize that a nested for loop was being traversed by column instead of by row thus generating lots of cache misses
In fact, I'm not quite sure if the compiler thinks about cache at all. That's some optimizations that maybe the compiler can't help
Shreyash
Hey guys
klimi
Shreyash
Hey
I am new there buddy
Shreyash
Anonymous
My main task is to optimize the program like this, not algorithmically. For example, O3 didnt recognize that a nested for loop was being traversed by column instead of by row thus generating lots of cache misses
Never use -O3 unless you are a compiler developer. Default optimization in POSIX is -O1; however -O2 is the widest used optimization flag, so it must be the most reliable too
Anonymous
I kind of disagree. If your tests still pass and the program is faster, I see no problem
it is more exprimental, unreliable, buggy, and should not be used in development
Francisco
it is more exprimental, unreliable, buggy, and should not be used in development
Well, then every project that uses CMake and sets CMAKE_BUILD_TYPE=Release has a problem, as this option sets optimization flags to -O3
Francisco
That means, almost every project out there compiles with -O3
Mar!o
Lol
Sabin
how can I decode jsxbin file
Sabin
I didn't find any usable answers..
Sabin
in fuckinggooogle.com
Anonymous
So how can we know, if the Google does not?
Anonymous
It is offtop actually
Anonymous
hey guys can you check this code? in last line they are not printing the percentage
Anonymous
Anonymous
2nd is question
Anonymous
Kqixs
I recently started learning c++(my first language), this puzzle is easy to solve on human logic, was wondering how a program would look like to solve this(I'm a newbie, couldn't figure it out)
Kqixs
It is not programming
Yeah, I know, I asked it to understand a possible computer logic for this
Anonymous
can anyone check this out plz
Anonymous
Yeah, I know, I asked it to understand a possible computer logic for this
No "computer logic" here Just human one
Asdew
No "computer logic" here Just human one
He asked for an algorithm to solve that.
Anonymous
He asked for an algorithm to solve that.
There is no algorithm Just thinking