does the sorting have to be done inside the timecounting or outside?
WOW, Roberto put in the battle field one of his creature: STAT module !
My version was 10 times faster than Petr one.
Roberto version is 4 times faster than mine.
Quite unbeatable!
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
does the sorting have to be done inside the timecounting or outside?
Hello Mike,
rules should be given before not after. :
However you should absolutly make the sort inside the timecounting plus two clyce for next like me and Petr and optionally run astatement! ;Dsleep 100
Ciao,
Roberto
http://www.thinbasic.com
Mike,
sorry about Roberto comment ???
He activated pre-vacation flag ;D
To beat Roberto code the only way is:
[code=thinbasic] dim t1, t2 as quad
t1 = gettickcount
'---Do nothing
t2 = gettickcount
msgbox 0, "Result of text analysis (" + STR$( (t2-t1)/1000, 3) + " seconds)", %MB_OK or %MB_ICONINFORMATION, "Results"
[/code]
;D
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Ops, excused me I have overstate I wanted to say SLEEP 10 instead of SLEEP 100.
You can't belive but I found a tipical italian spaghetti code that bets my code although it executes a SLEEP 10 instruction.
Here is the power code:
[code=thinbasic]dim t1, t2 as quad
dIM s AS STRING
t1 = gettickcount
s="5000 SPC"+$CRLF+"3000 e"+$CRLF+"2000 t"+$CRLF+"2000 o"+$CRLF+"2000 i"+$CRLF+"2000 h"+$CRLF+"1000 w"+$CRLF
s=s+"1000 s"+$CRLF+"1000 r"+$CRLF+"1000 g"+$CRLF+"1000 NUL"+$CRLF+"1000 H"+$CRLF+"1000 ?"+$CRLF+"1000 ,"+$CRLF
sleep 10
t2 = gettickcount
msgbox 0,"Result of text analysis (24000 bytes)"+$CRLF+$CRLF+s+$CR+$CR+"Operation took:"+STR$( (t2-t1)/1000, 3)+" seconds", %MB_OK or %MB_ICONINFORMATION, "Results"
[/code]
Good Easter to all,
Roberto
http://www.thinbasic.com
Roberto,
next time you will have so nice code to post, please obfuscate it so we will not see such a mess.
Go holiday, please
Ciao. See you next week.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Apart the jokes, personally I have to thanks Petr because through the Coding Challenge it has given the occasion to me to show an example of thinbasic_stat.dll module and also understand that some new functionality should be usefull if added to the module. At least this until now because the challenge continue.
Regards,
Roberto
http://www.thinbasic.com
I guess we are allowed to look at the code now. I will study them this weekend as not sure what is going on quite with the challenge. But reading Eros's post about the speed increases in each of your examples, dramatic speed improvements.
I am sure these challenges will be very entertaining and educating too, hoping for some time to look this weekend!!
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Hi,
Eros, Roberto ... what did you do to me
Very fast codes, as usual I forgot thinBASIC pointer magic and STAT module!
Thanks!,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Petr, I think Eros and Roberto are disqualified ;D Eros looked at Roberto's code before friday the 13th and Roberto used the power of modules ;D
But I forgive them both, my mind is on vacation mode too.
So it is only between Petr and me, he he. But only if Kent won't participate.
Here is my entry. Not sure how fast it is.
Michael
Bookmarks