Here's a CHDK-less SD benchmark.
The top of the extend.m must be edited with the correct addresses for Open, Write, Close and GetSystemTime (all should be available in funcs_by_*.csv)
The SD info function can optionally be set. If not known, it should be set to 0.
Make sure the card is prepared as a script disk
If running under CHDK, remember to use a build without ARAM enabled
Put extend.m and cbbench.bin on the card
Start the camera and press set
The results are logged to cbbench.log, using UART redirection. If you are running CHDK the console output hooked, this won't work. The log is appended each run.
The script attempts 8 runs of 128 MB each, so it may take some time (e.g >100 sec at 10 MB/s). It tries to use LCDMsg to display, but on g7x I only see the message switching to record mode after the script is done.
It will leave a 128 MB file called cbbench.dat on the card.
I've only used it on G7X so far, but I think it should theoretically work on recent non-digic 6 cameras edit: Runs fine on elph130 too, without sdinfo. The binary is position independent ARM, and gets all entry points as function arguments. It assumes the start of uncached memory is at 0x40000000, and does 16 8MB writes to a file from that address each time it's called. The time measured is for the write() calls, without the open and close.
Results
I tested under CHDK with the
SD reset hack and without CHDK. In all cases, the results with and without were essentially identical. The results were also broadly similar to CHDK benchmark results.
wintec-2012 ~31 MB/s (edit: as a sanity check, I tried this card using CHDK without SD reset. Result was ~20 MB/s as expected.)
patriot-32g-2015 ~25 MB/s
team-16g ~10 MB/s
sandisk-16g ~9 MB/s
So, the [admin: avoid swearing please] performance of the last two allegedly UHS1 cards appears to have nothing to do with CHDK.
Other stuff:
I made the loadcbbench.lua file in the zip for development. It can be used to load the bin with chdkptp rather than Canon basic. Usage:
=<loadcbbench.lua
the load address is printed
To run, use
.return call_func_ptr(<load address>,<Open address>,<Write address>,<Close address>,<GetSystemTime address>)
wait for it to finish
getm
to get the elapsed time. You can run multiple times without reloading. "." is used instead of "=" to avoid polling while the benchmark runs.
edit:
updated 2017-05-09 to fix
some typos in the cache clearing code