I was taking a look at some coredll routines when I realized that many of these routines come from an outdated C library. I looked around for some updated routines, and I found faster routines in Linux and in RVCT (RealView compilation tool, now owned by ARM). The routines in Linux are actually pretty much the same as in CE 6.0, so I guess Microsoft never updated the CE 5.0 routines to newer optimized ones. RealView's strcmp used new v6 SIMD instructions (namely, UQSUB8). I decided to test each routine out to see how well it performed. I tested 1 million iterations of strcmp() against 10 twenty-six character comparisons with a mix of identical, mismatch at end, and mismatch at beginning strings. The results are in the standard Excel spreadsheet below:
The ARMv6 instructions used by RVCT had the clear advantage here. While a 29% performance increase is impressive, this only applies to strcmp. However, updating the C library should have clear benefits as nearly all Windows Mobile applications use the library, and this would be a rapid way to increase performance across the board.
Another side thing to note is that strcmp isn’t actually used that much in Windows Mobile, the wide character version, wcscmp is usually used instead – maybe profiling that is next. However, it appears there are newer versions of that and many other functions as well. What we’ll need is an automated way to update the C libraries in coredll…