[PATCH] Additional benchmarks for cache_utf8

Dmitry Vasiliev lists at hlabs.spb.ru
Tue Nov 28 15:43:53 GMT 2006

John Arbash Meinel wrote:
> Dmitry Vasiliev wrote:
>> The attached patch adds benchmarks for the case when items are missed
>> from the cache as proposed by John.
> v- Weird. I don't know why it was working without the u''.
>> -        revisions = ['\u062c\u0648\u062c\u0648' +
>> +        revisions = [u'\u062c\u0648\u062c\u0648' +

It just was '\\u062c...' and later when a random unicode string was added it 
became u'\\u062c...' (an unicode string with characters '\', 'u', '0', '6', 
'2', 'c'...).

> v- Can you tell me the approximate time it takes to run these tests, and
> how it changes with your new patches?

On my system it was:

$ bzr selftest --benchmark 'cache_utf8.*500K_by_1.*cached'
.test_decode_500K_by_1_ascii_cached   OK 14678ms/16642ms
.test_decode_500K_by_1_unicode_cached   OK 16904ms/26119ms
.test_encode_500K_by_1_ascii_cached   OK  9994ms/13917ms
.test_encode_500K_by_1_unicode_cached   OK 10004ms/14201ms

and the patched version:

$ bzr selftest --benchmark 'cache_utf8.*500K_by_1.*cached'
.test_decode_500K_by_1_ascii_cached   OK 13815ms/15774ms
.test_decode_500K_by_1_unicode_cached   OK 15705ms/24435ms
.test_encode_500K_by_1_ascii_cached   OK  8701ms/13209ms
.test_encode_500K_by_1_unicode_cached   OK  8902ms/12956ms

> The changes themselves all look good (+1), and I'd like to merge it
> before your other patch if possible. That way we have 1 revision of
> bzr.dev with the new benchmarks. And then another revision with the
> actual performance improvements.


Hmm, it seems BB didn't catch the patch. Should I repost it?

Dmitry Vasiliev (dima at hlabs.spb.ru)

More information about the bazaar mailing list