Re: [PATCH 1/5] vhost: use binary search instead of linear in find_region()

2015-06-16 Thread Igor Mammedov
On Tue, 16 Jun 2015 23:07:24 +0200 "Michael S. Tsirkin" wrote: > On Tue, Jun 16, 2015 at 06:33:35PM +0200, Igor Mammedov wrote: > > For default region layouts performance stays the same > > as linear search i.e. it takes around 210ns average for > > translate_desc() that inlines find_region(). >

Re: [PATCH 1/5] vhost: use binary search instead of linear in find_region()

2015-06-16 Thread Michael S. Tsirkin
On Tue, Jun 16, 2015 at 06:33:35PM +0200, Igor Mammedov wrote: > For default region layouts performance stays the same > as linear search i.e. it takes around 210ns average for > translate_desc() that inlines find_region(). > > But it scales better with larger amount of regions, > 235ns BS vs 300n

[PATCH 1/5] vhost: use binary search instead of linear in find_region()

2015-06-16 Thread Igor Mammedov
For default region layouts performance stays the same as linear search i.e. it takes around 210ns average for translate_desc() that inlines find_region(). But it scales better with larger amount of regions, 235ns BS vs 300ns LS with 55 memory regions and it will be about the same values when allow