Speed Test for Find Image Macro (v11.0.1)

Here are my results:

Model Name                │  iMac (iMac18,3)
Processor Name            │  Quad Core Intel Core i5
CPU                       │  3.8 GHz (1 CPU, 4 cores)
Memory                    │  40 GB
macOS Version             │  macOS 14.2.1 (23C71)
Keyboard Maestro version  │  11.0.2

GPU                       │  Radeon Pro 580
Display                   │  iMac
 Current resolution       │   2560 x 1440 (3,686,400 pixels)
Total pixels              │  3,686,400

Test Details              │  100 tests in 13.60 seconds (0.1360 secs/test)
──────────────────────────│─────────────────────────────────────────────────
Find Image On Screen      │  27,096,101.9 pixels per second

Here are my results:

Model Name                │  iMac (iMac21,1)
Chip                      │  Apple M1
Cores                     │  8 (4 performance and 4 efficiency)
Memory                    │  16 GB
macOS Version             │  macOS 14.2.1 (23C71)
Keyboard Maestro version  │  11.0.2

GPU                       │  Apple M1 (8 cores)
Display                   │  iMac
 Current resolution       │   2240 x 1260 (2,822,400 pixels)
Display                   │  HISENSE
 Current resolution       │   3840 x 2160 (8,294,400 pixels)
Total pixels              │  11,116,800

Test Details              │  100 tests in 50.08 seconds (0.5008 secs/test)
──────────────────────────│─────────────────────────────────────────────────
Find Image On Screen      │  22,196,863.3 pixels per second
1 Like

Here are my results:

Model Name                │  MacBook Pro (MacBookPro16,1)
Processor Name            │  8 Core Intel Core i9
CPU                       │  2,4 GHz (1 CPU, 8 cores)
Memory                    │  64 GB
macOS Version             │  macOS 13.6.3 (22G436)
Keyboard Maestro version  │  11.0.2

GPU                       │  Intel UHD Graphics 630
GPU                       │  AMD Radeon Pro 5500M
Display                   │  Color LCD
 Current resolution       │   2048 x 1280 (2 621 440 pixels)
Total pixels              │  2 621 440

Test Details              │  100 tests in 8,83 seconds (0,0883 secs/test)
──────────────────────────│─────────────────────────────────────────────────
Find Image On Screen      │  29 700 943,2

I must say I find it odd that your M1 iMac performed this test so much slower than mine and yours Intel Macs, @troy. The M1 iMac's screen resolution have about four times more pixels than my screen resolution, but still. The pixels per second calculation also shows the M1 to be slower than your Intel Macs.
EDIT: Or I see now, that you also have an external screen hooked up to your M1 iMac there, which brings your total pixel count up even higher, but still I would have assumed an Apple Silicone Mac should have performed faster.

There also seems to be a slight bug with how my data is displayed. The last line does not come out as complete. Might it have something to do with me living in Norway where we use comma as a decimal symbol (and space/ hard space as thousand separator), instead of the point/dot/period (and comma as thousand separator)? I see a commas showing up as decimal symbols in the second to last line also

EDIT2:
Here are my results (with my UHD OLED connected):

Model Name                │  MacBook Pro (MacBookPro16,1)
Processor Name            │  8 Core Intel Core i9
CPU                       │  2,4 GHz (1 CPU, 8 cores)
Memory                    │  64 GB
macOS Version             │  macOS 13.6.3 (22G436)
Keyboard Maestro version  │  11.0.2

GPU                       │  Intel UHD Graphics 630
GPU                       │  AMD Radeon Pro 5500M
Display                   │  Rec. ITU R BT.709 5
 Current resolution       │   3840 x 2160 (8 294 400 pixels)
Display                   │  Color LCD
 Current resolution       │   1792 x 1120 (2 007 040 pixels)
Total pixels              │  10 301 440

Test Details              │  100 tests in 38,70 seconds (0,3870 secs/test)
──────────────────────────│─────────────────────────────────────────────────
Find Image On Screen      │  26 621 023,4

Yep, that's exactly it—the regex just looks for the trailing period, and isn't expecting a comma. I should be able to fix that.

But that's correct, right?

-rob.

Great that you'll be able to fix it!

Yes, perfectly correct! Only surprised that it would return commas, when I am so used to having to use points/dots/periods instead while using KM and other technical applications. However I do not know how used people from different regions are to looking at commas as a decimal separator though, when comparing results here and such. (I kind of didn't even realise myself at first, that the last line result was in fact a correct result, apart from the missing text at the end.)
So in this case I think I would actually personally prefer it returning the results with the English languages system of number punctuation. (Something it is almost strange for me to admit, as I often criticise how we allow anglicisation to shape allot of our languages evolution.)

That's actually trickier, as I'm using KM's built-in format token and it respects the local setting for separators. To not do that, I'd have to write my own rounding and formatting functions :).

I'll try to get that end bit fixed later today.

-rob.

Oj, wow, I actually did not know that this feature changes dots to commas here on my system. Good thing for me to be aware of, as I now know that any formatted calculation will fail for any further calculations on my system. Thanks for pointing this out to me!

Image of how calculations of formatted numbers are dealt with on my system.

Screenshot 2023-12-22 at 20.45.11
EDIT: Changed the image

Yea, I ran into this with another macro, and asked Peter to put a more-clear note on the time formats wiki pages, which he has now done:

Note that numeric values in Keyboard Maestro allow only “full stop” decimal (.) and no thousand separators (except optional underscores), so the output of this token will likely not be a valid number for a Keyboard Maestro calculation. It should be used only for display purposes.

So I now make a copy of any variable I need to keep using, and format the copy.

-rob.

1 Like

Now it does:

Find Image On Screen      │  33.917.735,9 pixels per second

This version of the macro handles the comma-separated decimals numbers:

zSpeed Test for Find Image √.kmmacros (306 KB)

-rob.

Here are my results:

Model Name                    │  iMac (iMac14,2)
Processor Name                │  Quad Core Intel Core i7
CPU                           │  3.5 GHz (1 CPU, 4 cores)
Memory                        │  32 GB
macOS Version                 │  macOS 13.6.1 (22G313)
GPU                           │  NVIDIA GeForce GTX 780M

Display                       │  iMac
 Current resolution           │   2560 x 1440 (3,686,400 pixels)
Display                       │  DELL 2001FP Calibrated 3
 Current resolution           │   1600 x 1200 (1,920,000 pixels)

Find Image On Screen Results  
Pixels/sec                    │  26,798,119.4
────────────────────────────────────────────────────────────────────────────
Details                       │  100 tests in 20.92 seconds (0.2092 secs/test)