Event struct via registers

claptrap clap at trap.com
Sun Aug 11 01:21:18 UTC 2024


On Saturday, 10 August 2024 at 08:18:54 UTC, Vitaliy Fadeev wrote:
> On Saturday, 10 August 2024 at 08:06:42 UTC, IchorDev wrote:
>
>> Is your application highly performance critical?
> Many input event + many internal ui events -> many calls * many 
> objects.
>
> Yes, I like the fast, responsive interface on old hardware (as 
> B970 CPU).

Lets say you get mouse events 100 times a second and and you have 
10 function calls to filter through the gui tree, and your 
overhead for passing on the stack is 20 cycles.

(100*10*20) = 20,000

And your CPU is 2Ghz, so...

2,000,000,000 / 20,000 = 100,000

So what you're optimizing for is like 0.001% of your cpu time.

It's utterly irrelevant.





More information about the Digitalmars-d-learn mailing list