Page 1 of 1

Speedy LiveCode

Posted: Thu Sep 20, 2018 11:31 pm
by dunbarx
I have not changed my machine in years, and am using v. 8. on a 3.2 GHz iMac in OS 10.13

A handler like the following:

Code: Select all

on mouseup
   put the ticks into temp
   put "4" into foo
   repeat 10000000 --ten million
    add 4 to foo  --79 ticks
    -- get random(999) --86 ticks
    --  put 4 +  6 into foo -- 118 ticks
   end repeat
   answer the ticks - temp
end mouseup
Takes 79 ticks, or about 7.6 million passes through the repeat loop per second. The other operations are only a little slower.

This is well over twice as fast as benchmarks I made years ago, in v.6. Good news, and in RAM only, so am I noticing anything important?

Craig

Re: Speedy LiveCode

Posted: Fri Sep 21, 2018 8:33 am
by richmond62
120 ticks over "here" on a piece of junk I got for nothing:

Xubuntu 18.04

Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
Dual Core
8 GB RAM
computer_slap-large-seal.jpg
computer_slap-large-seal.jpg (34 KiB) Viewed 9114 times
nothing as in "This lump of something has been sitting around
for donkey's ages in my shop and nobody wants it, so do me a favour . . ."

I'll never complain about the speed of LiveCode beyond the occasional "That's too fast for me." 8)

Re: Speedy LiveCode

Posted: Fri Sep 21, 2018 8:38 am
by richmond62
168 ticks on my 2006 iMac:

Mac OS 10.7.5 (Lion).
2.16 GHz Intel Core Duo
3 GB RAM
sleepyLion.jpg
sleepyLion.jpg (12.59 KiB) Viewed 9115 times
Certainly a lot faster than my ability to gulp coffee!

Re: Speedy LiveCode

Posted: Fri Sep 21, 2018 11:03 am
by AxWald
Hi,
dunbarx wrote:
Thu Sep 20, 2018 11:31 pm
This is well over twice as fast as benchmarks I made years ago, in v.6. Good news, and in RAM only, so am I noticing anything important?
Twice as fast as in LC 6? Sure you don't have any quirks in your data?

I tried it on my cheap (€ 50 as leasing return) dev machine (HP Compaq 6005 pro, built 2010, Athlon II X2 B24 @ 3GHz, 8GB RAM, Win 10-64 pro v1803), using my reference LC versions and each of the 3 options in your code:

Code: Select all

LC/ Task:	6.5	6.7.10	7.1.4	8.1.8	9.0.1
-----------------------------------------------------
"add 4":	50	41	88	128	135
"random":	78	75	100	145	174
"4 + 6":	116	80	111	188	224
Have fun!

Re: Speedy LiveCode

Posted: Fri Sep 21, 2018 12:52 pm
by Klaus
MacMini (late 2014), 8 GB RAM, 2.6 GHZ i5, macOS 10.3.6, LC 9.0.1:

Code: Select all

-----------------------------------------------------
Ticks:
"add 4":	73
"random":	77
"4 + 6":	116
-----------------------------------------------------
Milliseconds
"add 4":	1211
"random":	1270
"4 + 6":	1939
-----------------------------------------------------

Re: Speedy LiveCode

Posted: Fri Sep 21, 2018 8:10 pm
by bogs
I took your code, and put it into a little stack for testing, starting with Mc 2.5 starter kit :D
livecodeide_speedtester_McStarterKit25.zip
Made in Mc2.5 starter... Modified vers.
(1.02 KiB) Downloaded 269 times
This box is running LMDE2 18.1, 4 gigs ram, and a 3 core amd cpu. All of the tests were run with the following system resources left before opening the various IDEs -
Selection_016.png
Conky...
I moved up through the IDEs from Mc pre-oss to Lc 8.1.2 on this machine. On to the tests...
Image...Image...Image...Image...Image...Image...Image...Image...Image

*Edit - just setup a vm to test 9.0.1 on debian testing, so grabbed that test as well -
Selection_017.png
Lc9.0.1 test...
*Edit 2 - just realized I should probably have mentioned all the results were testing only the add to foo line as the base :oops:

Edit 3 - Modified it a bit -
Image

Re: Speedy LiveCode

Posted: Sat Sep 22, 2018 2:37 pm
by Klaus
And here is MC with engine 5.5.4, the latest version I maintained as the MC poobah. :-)
speedy_mc.jpg

Re: Speedy LiveCode

Posted: Sat Sep 22, 2018 2:51 pm
by bogs
Thanks for running it Klaus, I don't have any 5.x series to test with :D

Re: Speedy LiveCode

Posted: Sat Sep 22, 2018 8:25 pm
by paul_gr
I'm still using LC 5.5.5 for general use in Windows 10.
System is Intel i7-8700k, 16Gb ram running Windows 10 64bit.

Dunbarx's code snippet in LC 5.5.5 takes 15 ticks.

Using bogs MC stack.
Speedy LIveCode.png
Paul

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 12:52 pm
by bogs
Running this on 'nix sure makes the older IDEs look speedy as heck.
6.5.2 vs. 8.1.2 -
Selection_012.png
6.5.2...
Selection_013.png
8.1.2...
@paul_gr -
Holy cats :shock:

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 4:25 pm
by richmond62
The Transcript engine you are running
isn't that just a bit . . . ?

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 4:41 pm
by bogs
Think I should change it to "The X-talk engine you are running.." ? :D

I made it a standalone in 6.5 and 7.1, to see if there was any differences to note.
Speedy LIveCode_015.png
No IDE 6.5.2...
Speedy LIveCode_016.png
No IDE 7.1.4...

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 6:09 pm
by richmond62
Art imitates life: a slow decline:
LC7.png
LC8.png
LC9.png

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 6:56 pm
by richmond62
And here are the standalone results (Xubuntu 64-bit, 18.04):
standAlone7.png
LC 8.1.10
LC8.1.10.png
LC 9.0.1
LC9.0.1.png

Re: Speedy LiveCode

Posted: Sun Sep 23, 2018 7:17 pm
by bogs
Yah, I saw that problem too Richmond. Beyond 8.0 (I think) you need to save the file in the current Lc IDE format before compiling it. To boot, you may have to compile it with 'nix64 and not 32, or you might get a shared library error.

v9 standalone (Debian Vm)
Selection_017.png
v9 64bit standalone...
*Edit - to get the v9 compiled 32bit 'nix version to run, your system needs to be setup for multi-arch (see debian multi-arch if your debian based), and from the command line you need to enter -

Code: Select all

sudo apt update
sudo apt-get install libgtk2.0-0:i386
Here is the 32 bit version of the compiled v9 standalone -
Selection_018.png
v9 32bit standalone...