Page 3 of 3

Re: Why stays Global variable empty ?

Posted: Sun Dec 07, 2014 11:31 pm
by bosker
So...
I made a standalone exe with no debug using 'normal' names and another using ridiculously long names.
I compared the exe files and the code is identical.
(There is 1 byte different in the PE header at 0x88 which is the lowest byte of compile time)
When I run these files I get exactly the same time with either one (as you should expect when running exactly the same code).

So variable names have no effect on the final exe code and therefore cannot have any effect on execution time.
The reason for the differences seen lies elsewhere.

Re: Why stays Global variable empty ?

Posted: Sun Dec 07, 2014 11:45 pm
by juror
What's amazing is that so-called "programmers" are supporting the variable name length argument.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 12:02 am
by Vera
Fred wrote:The variable name length can't be the cause of the slowdown, as it isn't stored in the final executable: once compiled all is resolved internally in an address, the name is dropped.

Here the speed test with debugger off (not DisableDebugger as it's not the same):

---------------------------
Tests
---------------------------
Test1 999
Test2 999
Test3 999
Test4 999

---------------------------
OK
---------------------------

Which is expected.
Thanks Fred for taking your time and clarifying :-)

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 2:27 am
by IdeasVacuum
What's amazing is that so-called "programmers" are supporting the variable name length argument.
That is an insult. What we really saw here was a frivolous discussion about why there was a few milliseconds difference between results, i.e. whatever the reason it wouldn't be seen as important, but good programmers will always have their curiosity tickled by these things.

If somebody raises a question on this forum, it does not matter whether assumptions they make are right or wrong, we just have a discussion about it. Usually one or more people with prior knowledge can give a conclusive explanation. Sometimes there is a little bit of friendly mud-slinging and so long as it is understood to be friendly, that's fine too. Insults though are not acceptable, this is a friendly forum where everyone helps everyone.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 4:08 am
by juror
IdeasVacuum wrote:
What's amazing is that so-called "programmers" are supporting the variable name length argument.
That is an insult.
It was meant to be. A real programmer should have some knowledge of computer science and have a clue about how compilers work. You mean PB "programmers" don't know it uses FASM?

Good discussion is one thing. Arguing that a poorly constructed test constitutes "proof" is something else.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 6:27 am
by IdeasVacuum
I mean that a lot (if not the majority?) of the people on this forum are hobbyists. Many are self-taught and actually very skilled but they are unlikely to know everything - but then, who does? There are plenty of professional developers, especially these days, that have less knowledge of what goes on 'under the hood'. We are now blessed with more computing power and storage than we need for most applications, so that's fine. A Formula 1 driver doesn't necessarily understand how the underlying technology of his car works, but he does know how to get the best out of it.

No matter how skilled or not anyone may be in your view, please do not throw insults. It's not nice and it's not necessary. When potential new PB customers see such nastiness they could be deterred, which would be a great shame.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 7:31 am
by Little John
juror wrote:A real programmer should have some knowledge of computer science and have a clue about how compilers work. You mean PB "programmers" don't know it uses FASM?

Good discussion is one thing. Arguing that a poorly constructed test constitutes "proof" is something else.
I agree with you.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 8:20 am
by Fred
juror wrote:What's amazing is that so-called "programmers" are supporting the variable name length argument.
No need to be harsh, it's not that obvious. PureBasic is used by a wide range of users, so all questions are legitimates.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 9:06 am
by PB
[Edit] Actually, forget it. I'm over arguing with people on forums. It's not worth it.

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 12:44 pm
by blueb
PB wrote:[Edit] Actually, forget it. I'm over arguing with people on forums. It's not worth it.
The only time I'll argue is when I'm defending PureBasic! :mrgreen:

Re: Why stays Global variable empty ?

Posted: Mon Dec 08, 2014 3:01 pm
by Little John
Fred wrote:so all questions are legitimates.
Probably everyone will agree to this sentence.
And actually I can't see that asking a question did cause any problem here.

Re: Why stays Global variable empty ?

Posted: Tue Dec 09, 2014 11:39 pm
by juror
Fred wrote:
juror wrote:What's amazing is that so-called "programmers" are supporting the variable name length argument.
No need to be harsh, it's not that obvious. PureBasic is used by a wide range of users, so all questions are legitimates.
My apologies Fred. Somehow I associated a "PureBasic Expert" with a real programmer.

Re: Why stays Global variable empty ?

Posted: Wed Dec 10, 2014 12:18 am
by Fred
Very funny. I think it's time to close this thread.