BBC BASIC for Windows
« Evaluating IRQ handlers »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:55pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Evaluating IRQ handlers  (Read 883 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Evaluating IRQ handlers
« Thread started on: Jan 22nd, 2012, 10:13am »

Quote:
The programme currently handles incoming from ON MOVE, ON MOUSE, ON SYS, ON TIME, and -- very much to my testing point -- a PROCedure which runs off a system timer and generates bursts of fake IRQs by poking its parameters into the appropriate buffer.

It would probably be better to generate real 'interrupts' by using SYS "SendMessage". That would be a more realistic test than anything you can 'fake'.

Quote:
You can view this well in MS-Wordpad (not with MS-Notepad !)

I'd appreciate you making it Notepad-compatible. I assume that simply means terminating the lines with CRLF?

Quote:
I further expect that someone can explain the clear anomaly in the byte() SWAP when one array is LOCAL, the other Global

The fact that the byte case is disproportionately affected is probably just chance, but the likely reason why a GLOBAL/LOCAL swap is slower is because (being at very different memory addresses) the CPU's cache is being used less efficiently.

Incidentally you don't say whether the real (by which I presume you mean variant) measurements were in *FLOAT40 (5 bytes per value) or *FLOAT64 (8 bytes per value) mode.

Richard.
User IP Logged

19Grumpah42
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 57
xx Re: Evaluating IRQ handlers
« Reply #1 on: Jan 22nd, 2012, 11:58am »


The fact that the byte case is disproportionately affected is probably just chance, but the likely reason why a GLOBAL/LOCAL swap is slower is because (being at very different memory addresses) the CPU's cache is being used less efficiently.

As I said, this is no big deal for me, but does the above explain why the ranking for a G/L SWAP was B:I:R:S 1120:660:650:730. The numbers are repeatable +/- 10.

And whatever do you mean by "chance"?
--Grahame
User IP Logged

C-2-Q 3GB, C-2-Duo 2GB, both GeForce 9500 GT, WinXP sp3. Two Linux Ubuntu boxes (rock solid, lean and mean, but they won't run BB4W!).
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Evaluating IRQ handlers
« Reply #2 on: Jan 22nd, 2012, 12:54pm »

on Jan 22nd, 2012, 11:58am, 19Grumpah42 wrote:
And whatever do you mean by "chance"?

For example, the speed of access will depend on the address alignment so if a variable happens to be DWORD-aligned (i.e. at an address which is a multiple of 4) the access may be considerably faster than if it isn't. In any given circumstance there is a 1-in-4 probability that the variable will have this desirable alignment, and it's in that sense that I used the word 'chance'.

So you could easily find that an insignificant change to your program makes (say) the G/L swap faster and the G/G swap slower, simply because of alignment changes. There's nothing 'random' about it, but because the speed change will have had no obvious connection with the code modification it may appear that way.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls