Red vs. Green - vs. the Developer!

For general discussion related FlowStone
stw
Posts: 111
Joined: Tue Jul 13, 2010 11:09 am
Contact:

Re: Red vs. Green - vs. the Developer!

Post by stw »

Thanks for sharing Trog!
Very nice visualizing ;)
Jay
Posts: 276
Joined: Tue Jul 13, 2010 5:42 pm

Re: Red vs. Green - vs. the Developer!

Post by Jay »

Hi

Cheers for this master class Trogg! some stuff learned from it already :)

oh and i love all the arrows and text boxes! nice touch! looks minted m8

Regards
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Red vs. Green - vs. the Developer!

Post by trogluddite »

Thanks guys - glad you're liking the widgets; they should make it much easier and quicker to make tutorials and module "user guides" - no more messing with OpenOffice, Photoshop, folders of images to manage etc.!

If anyone fancies using those graphics themselves, here's a very quick guide....
Text notes - L-click to edit the text, R-click for a context menu where you can select colours and turn the background and/or border on and off.
"Empty" Boxes - R-click on the border line for a context menu to change the colour and line style.
Arrows - L-click on the arrow and drag to change the direction. R-click the arrow to change color and width. The "fine" width creates the "boxout" line with a little blob on the end.

Arranging them takes a bit of practice, as they are really just modules with some transparency and the borders switched off - you will sometimes have to hunt a bit with the mouse to find a "handle" when you want to move or re-size them. Mouse events don't "fall through" the transparent parts either, so try to have some space available to move them out of the way - for example, if you need to edit stuff that's "inside" one of the box icons. To get the layering right, you can bring an item to the top by cutting it (Ctrl-X) and pasting it straight back in (Ctrl-V).

How's anyone getting on with the "cartoon strip" feel? It was a bit of an experiment, so I just wonder if anyone else share's tester's opinion that "all on one page" is a bit clunky.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Red vs. Green - vs. the Developer!

Post by Nubeat7 »

thank you trog, great stuff to learn from very interesting!
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: Red vs. Green - vs. the Developer!

Post by RJHollins »

Big Thanks TROG for this tutorial/ lesson !

The 'comic' layout is very easy to follow along. The graphic high-lites and text boxes seemed very intuitive to follow.

Really nice presentation. Thank-you for taking the time doing this. 8-)

As to the actual testing of the various routines ... some great stuff for me to study [of course].

I do have a question, though :o

It seems that clicking the 'trigger' to start the test will yield different output times [most notably the very last test routine]. I get timing results like this:

1. 0.0310001
2. 0.0149994
3. 0.0159998
4. 0.0310001
5. 0.0159988

etc ... what would this be attributed to ??

Thanks again :D
DjMmix
Posts: 16
Joined: Wed Nov 09, 2011 8:02 am
Location: france

Re: Red vs. Green - vs. the Developer!

Post by DjMmix »

hi guy's ,

I test your benchmark trog well and thank you for this nice work :)

I wanted to test how quickly a dll following (and respecting your code of course)

see how time put with a dll.

and the result is interesting outright I see attached below the fsm and the project dll to prove my good faith: p

a screen capture on my pc to the result obtained

bloggif_52aef0d51f41b.png
bloggif_52aef0d51f41b.png (113.74 KiB) Viewed 15998 times


and now the project file and the fsm

rapidcalcul.zip
(49.76 KiB) Downloaded 975 times


C + + is faster is normal this is not an interpreted language but I will think that to load a dll in memory have done it but not waste time :)
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: Red vs. Green - vs. the Developer!

Post by Nubeat7 »

wow its about 5 times faster here on my computer, thank you very much for providing this example!
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Red vs. Green - vs. the Developer!

Post by trogluddite »

Wow! - thanks a lot, Mmix, that is a excellent demonstration - the perfect completion of the benchmark comparison.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Red vs. Green - vs. the Developer!

Post by trogluddite »

RJHollins wrote:It seems that clicking the 'trigger' to start the test will yield different output times [most notably the very last test routine]. I get timing results like this:

There are a few reasons for this...

- The RTC timer is using green triggers to start and stop, so the precise moment will be missed by a short amount as the triggers are processed.
- Your CPU is doing other things besides running the test schematic - so the times vary according to the CPU's task switching.
- There will be times when Ruby's garbage collector has to come along and free up the memory used by temporary Ruby objects. This only happens occasionally when Ruby feels it is running short of space on its memory heap - so once in a while you just get unlucky. Something similar possibly goes on behind the scenes with 'Green' trigger management.

You will generally get more reliable times if you increase the count. I kept the number fairly low for the download because I don't know what CPUs people will be testing on - if the number is too big, Ruby goes splat!
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
DjMmix
Posts: 16
Joined: Wed Nov 09, 2011 8:02 am
Location: france

Re: Red vs. Green - vs. the Developer!

Post by DjMmix »

no problem if I can bring a stone to the edifice, I will bring my help
Post Reply