Code optimization

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: Code optimization

Post by Fluid Byte »

Five shit-postings later and still no one can give a solid argument. You guys are like Trump-Supporters who are asked how exactly he is going to make America "great again". You keep stammering, stuttering, start sweating and fail royally while you verbally fold under the pressure. Kinda sad, kinda hilarious. An entertaining train-wreck nonetheless.

By the way, let's not forget this "genius" argument:
luis wrote:The only other reason I can think of is that if something it's not needed, it's more appealing to me to not include it even if it's easier to just say "who cares".
You what mate? See, this why I called you an illiterate twat. I still have some empathy for you, just think before you post useless drivel.
luis wrote:At this point I would like the opportunity to bash your face in I must say.
That's a weird way of saying I'm right but I let it pass.

Honestly, look at you clowns calling 1MB "all that dead code" in 2017 while the new DOOM takes up almost 80 gigabytes ...

Anyway, if you are in some unknown shithole of a country with a 28k-Modem and you are trying to write a tech-demo for a Nokia 6110 then so be it, you can say "I got you!". Other than that, stop talking shite :wink:
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: Code optimization

Post by luis »

Whatever, you don't get it. A lost opportunity.
You'll understand why in much broader terms when it will be too late, and I'm not talking about computers here.
C'est la vie.
EOT
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Code optimization

Post by the.weavster »

Fluid Byte wrote:You guys are like Trump-Supporters who are asked how exactly he is going to make America "great again".
I think I can answer this one - he's going to let Putin run it :twisted:
User avatar
skywalk
Addict
Addict
Posts: 3994
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Code optimization

Post by skywalk »

Hey now, what does Trump have to do with exe size?
Tough keeping Fluid Byte on topic...
Why no mention of Call of Duty or some other team developed mega code to compare with our modest and fast PureBasic apps? :lol:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
the.weavster
Addict
Addict
Posts: 1537
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Code optimization

Post by the.weavster »

skywalk wrote:Hey now, what does Trump have to do with exe size?
Maybe his tiny little hands are an example of how to reduce size without losing functionality?
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: Code optimization

Post by Fluid Byte »

luis wrote:Whatever, you don't get it. A lost opportunity.
You'll understand why in much broader terms when it will be too late, and I'm not talking about computers here.
C'est la vie.
EOT
By the way, out of all your bullshit arguments I liked the "I care" one the best. That was fucking hysterical dude.

Me: Yo, Bill Gates.
Bill: Whatup?
Me: Can you give me 7 billion dollars?
Bill: Why should I?
Me: Because I care
Bill: Fair enough, here you go

skywalk wrote:Hey now, what does Trump have to do with exe size?
Why are you asking this? You saw what I wrote. It was an analogy, comparing your behavior with those of Trump-Supporters. Which basically boils down to blindly praise and defend an ideology which in itself is not based on facts, logic or reason. Hence why I mocked luis' "I care" argument.
skywalk wrote:Why no mention of Call of Duty or some other team developed mega code to compare with our modest and fast PureBasic apps? :lol:
It amuses me a great deal to see how that point went right over your head. You are crying about 1MB which in fact would be a big deal, if it was 1991. The rest of the world has moved on since then but for some reason you keep living in the past. I already made that point and the only reason I have to repeat it is caused by your inferior intellect or pure ignorance. Sure, there is a limit of how much extra weight is tolerable in the final .EXE. But if the file size is not a 3 digit number it's not problematic.

Fun Fact: Call Of Duty Infinite Warfare takes up about 92GB
the.weavster wrote:Maybe his tiny little hands are an example of how to reduce size without losing functionality?
This guy, this guy gets it.
Last edited by Fluid Byte on Thu Jul 13, 2017 9:48 pm, edited 1 time in total.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Code optimization

Post by kenmo »

Fluid Byte wrote:Honestly, look at you clowns calling 1MB "all that dead code" in 2017 while the new DOOM takes up almost 80 gigabytes ...
These game arguments are bad arguments.
I would guess that 99% of that 80 GB is level and art assets...
For the EXECUTABLES running the games, I guarantee they are using high-end super-optimizing compilers... including dead code removal... and this thread is asking for exactly that.


That's like saying... YouTube shouldn't worry about bloat of their webpages, because their video files are much larger anyway.



Anyway, it's just a feature request. Leave it at that. Optimization is not high priority but always welcome.


PS. "Some of us care" might be an insignificant argument, but it's true, unlike "no one cares" which is false and a favorite argument used by President-Who-Shall-Not-Be-Named :)
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Code optimization

Post by IdeasVacuum »

normeus wrote:I would also want to see smaller execs. I enjoy having a tiny 1meg PureBasic program doing what my massive C# programs do.
So count me in with the ones who care but, it does not change my life if code is not optimized.Norm.
That is so true Norm - applies to .Net apps in particular and in my experience has never failed to impress.

It's not all about minimal exe size though, it's minimal code behind that exe - If you take professional pride in the code you produce, you understand that the quality and reliability of your product has a lot to do with how careful you are in defining efficient code. So the desire for an optimisation that removes unused code for the final exe, even though unnecessary, is a part of a psychology that strives to produce the best possible product - perfectionism.

'Less is More' is a mantra that should always have a place in technology. For example, I currently have a newer model of a specific car range that I have been driving for 15 years. It is true that each new generation has boasted attractive features compared to past models - but it is equally true that unnecessary complexity has been added too, reducing reliability and for some things even reducing ease of use.

The PB forum is by far the best forum that I have ever been a member of. Human Beings will never agree about everything, but there is no reason why we can't be polite to others when expressing our opinions. There is a lot of uncouth stuff written in a friendly and hilarious way with no harm intended, lets not destroy our wonderful forum with personal attacks.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
skywalk
Addict
Addict
Posts: 3994
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Code optimization

Post by skywalk »

When personal mudslinging(name calling, swearing, etc.) is used, you know the author's argument is flawed. Why did Fred make UseSQLiteDatabase(), UseFLACSoundDecoder(), etc?
By Fluid Byte's logic, we can use them all and have giga exe's on the ready for any function.
C'mon this is 2017, the age of infinite RAM, Disks, ClockSpeeds. :idea:
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Code optimization

Post by Lunasole »

Oh that's so old thing with this question of optimization, I'm often repeating myself ^^

It's just stupid and ridiculous to have cool hardware and lot of TB on HDD just to waste benefits of that all for useless bloating and overheads that may be easily avoided. That's a big problem that typical codemonkey thinks nowadays like "cool now I have 16 GB RAM and 2TB, finally the limits of my incompetence removed and I can show if for 100%, making helloworld with 200mb in size or mouse driver taking 500mb. feel the technical progress, baby".

@Fluid Byte: New Doom you mentioned is not a rule (btw Doom series games were always made through ass from technical point of view, except those oldest). Most AAA games taking much less than 50 (and often less than 30GB). Recently also I see trend to raise optimizations in AAA-games, even in those poor and ported from consoles, maybe because monkeys are not totally ineducable...

What about that stuff with PB linking trash I don't know, just remember it was discussed enough and probably would already had improved if could be possible without writing/rewriting a lot.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: Code optimization

Post by Fluid Byte »

After getting completely verbally shredded and losing the argument you now shifted the debate into another area. Like a 5 year old covering his ears and eyes pretending not to realize that you got your ass handed to you.

What you are doing now is to mix up two different issues: optimization and file size. One might argue they are correlated, they are not in this case. The size of the distributed software, regardless of it's kind, doesn't automatically imply badly written code. You people have talked such an utter amount of bullshit that the initial post I was referring to has been long forgotten. Simple people love repetition though, so let me remind you:
User_Russian wrote:Please add code optimization and removal of unused procedures. When the program includes many modules, with thousands of procedures, the size of the executable file exceeds 1 MB, but not all procedures are actually used and deleting them will reduce the file size.
That is not optimization of code, the code is perfectly fine. He's talking about an extra weight of 1MB. You guys are so dramatic and try to upscale this into a horror scenario in your world. Suddenly every shareware tool is synonymous with DOOM, Photoshop and MS Office. Even if that was the case, again, it doesn't automatically imply badly written code.

Now with all due respect, if you don't have the intellect to drive this debate home you need to let it go and fuck off :wink:
Last edited by Fluid Byte on Fri Jul 14, 2017 1:19 pm, edited 1 time in total.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Demivec
Addict
Addict
Posts: 4089
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Code optimization

Post by Demivec »

I am in favor of having additional refinement in the removal of unused procedures.

Regarding the request for code optimazation, that is an ongoing request that has my whole hearted support. :)

I would also give my vote for individuals who are posting to refrain from so much trash talking and vulgarity unless it is posted in an off-topic thread devoted to that specific purpose. :mrgreen:
Last edited by Demivec on Fri Jul 14, 2017 12:36 pm, edited 1 time in total.
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: Code optimization

Post by Fluid Byte »

Demivec wrote:I am also in favor of having additional refinement in the removal of unused procedures.
Why?
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
Demivec
Addict
Addict
Posts: 4089
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Code optimization

Post by Demivec »

Fluid Byte wrote:
Demivec wrote:I am also in favor of having additional refinement in the removal of unused procedures.
Why?
This used to be one of the advertised selling points. As mentioned by others, the inclusion of code through the use of modules and also code defined as part of a resident library can cause many procedures and such to be added as parts of those code collections. This might be considered sloppy coding but it is increasingly likely to happen when code becomes longer and makes more use of modules in this fashion.

The compiler creates macros for procedures. If those macros aren't invoked the result is the code for those procedures is not included in the executible. However if an unused procedure calls another unused procedure (which may call many more, including library functions) the code for the called procedure is included in the executible and adds to the bloat.

The compiler can be a great help in eliminating this bloat.

After having said that, my projects are not so sensitive to the size of the execitible that 1 mB of additional code is a deal breaker for me. I am in definately in favor of less bloat.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Code optimization

Post by kenmo »

What you are doing now is to mix up two different issues: optimization and file size
Optimizing "for space" is 50% of optimization... you are thinking it only means "for speed".

Why does PureBasic need PNG and JPG encoders?
The world has enough disk space to store everything as BMP now!
Same for ZIP, MP3, etc.
You guys are so dramatic and try to upscale this into a horror scenario in your world.
? This thread was calm and civil until you came in saying the world is so vastly different now that it's outrageous for computer programmers to trim down their computer programs.

No one is saying "a few extra MB are filling my hard drive!"
They are saying "why not trim a few MB if the compiler knows it's not used?"

+1 for the request
(Obviously not a top priority)
Cheers
Locked