Comparison QB64 compiled with gcc optimizations and without
#55
(08-15-2022, 05:08 PM)Pete Wrote: I did come across some C/C++ code, but those languages uses a math lib, so the code is not nearly as involved. I find it interesting in that QB64 is a c/C++ translator. To that end, if my assumption that the c/C++ languages have a built in math lib to call, why didn't the developers take advantage of it?

As for FreeBASIC, I was there at its inception and everyone here knows I'm nott a fan, to put it mildly, but FB does have the advantage of compiling directly to binaries, where QB64 has to translate to c/c++ and then compile, so of course FB is going to be slower in that regard. My assumption is that once a "finished " project is in exe form, it becomes more a question of  the most efficient way the routine was coded making it the fastest, no matter what language it is coded in.

Pete

If there are errors with binary math, we definitely should have that in the backlog of things to fix in QB64. Maybe changing to a different better C math library would be a good workable solution, that's something the developers would need to decide. 

I don't mind QB64 translating to C code which is then compiled to executable - as long as it works! 
I think this way of doing things probably makes it easier to port it to other operating systems (like Mac & Linux) since they all have C compilers. As long as it ends up as working native code, that's fine. It's great to be able to write one program that can be compiled to run natively on Windows, Mac and Linux. 

Anyway, we need to make sure any errors or issues get put on the QB64 "to do" list so they can eventually get fixed...
Reply


Messages In This Thread
RE: Comparison QB64 compiled with Ofast and without - by madscijr - 08-15-2022, 06:28 PM



Users browsing this thread: 3 Guest(s)