On 2013-04-18 11:26, Martin Schreiber wrote:
> {$H+,R-}
> uses SysUtils, Windows;//strings;
> const
> TRIES = 1;
> CAPACITY = 1000000;
> var
> [...snip....]
Sorry, but that is not of the best tests... Anyway here is the results
on my system.
My changes:
- Used epiktimer for timing. It is a my precision timer
that doesn't require Windows API calls, and is more accurate
that standard GetTickCount() from FPC.
- Added an additional UTF-8 test using fpGUI's string methods.
Nothing else in your test code was changed.
$ ./speedtest
UTF-8: 0 entries in 000:00:00:00.001327
UTF-8 (fpGUI): 0 entries in 000:00:00:00.000928
UTF-16: 0 entries in 000:00:00:00.001988
UTF-32: 0 entries in 000:00:00:00.001982
>From that, the two UTF-8 tests are faster that the UTF-16 and UTF-32 tests.
I still think it's a rubbish test though, because it finds no entries
(expected from random data). I would rather search real Unicode text,
and use a Plane 0 (BMP) code point, and a Plane 1-15 code point.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk