CPU perfomance...

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

CPU perfomance...

Post by jedie »

How many CPU cycles does the 6809 at normal running frequency made in one second?

Currently, unoptimized DragonPy runs around 55000 cycles/sec.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: CPU perfomance...

Post by sixxie »

894886.25 (14318180 ÷ 16) - or slightly fewer on some Dragons.
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: CPU perfomance...

Post by zephyr »

894886.25 when a Dragon is fitted with a 14.31818 MHz crystal. 888625 when a Dragon is fitted with a 14.218 MHz crystal.
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: CPU perfomance...

Post by jedie »

Wow. Than i'm far away from that.
But ok, i didn't do any optimizing and have many logging action inserted... there is still a lot air ;)
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: CPU perfomance...

Post by jedie »

OK... It has interest me... So i just comment the many logging output with a script:
https://github.com/jedie/DragonPy/commi ... a37f8fce6b

New values are:
* Running is a VirtualBox with PyPy: ~315.000 cycles/sec (before: 140.000 cycles/sec)
* in VM with CPython: ~165.000 cycles/sec (before 37.000 cycles/sec)
* CPython native under Windows: ~235.000 cycles/sec (before 55.000 cycles/sec)

It's still far from 894.000 on a real machine. But i only remove the logging activity and make no real optimizing.
And it's just enough to make some tests...
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: CPU perfomance...

Post by jedie »

**update**

Currently TKinter doesn't work with PyPy under Windows. So i have implement a simple console with: https://github.com/jedie/DragonPy/commi ... debcf13f5d

So i can run the sbc09 ROM under Windows with PyPy... And so i go faster than realtime with ~1.370.000 CPU cycles/sec :mrgreen:

And remember: I only just commend the few logging activity and not really optimizing code.
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
User avatar
robcfg
Posts: 1533
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: CPU perfomance...

Post by robcfg »

You have to take into account that outputting debug data is quite a heavy process, so no wonder that without it, it goes faster... :)

Congratulations on having it running in real time!
Post Reply