Re: [ovs-dev] [PATCH v2 1/1] json: Serialize strings using a lookup table

2016-10-05 Thread Ben Pfaff
On Wed, Oct 05, 2016 at 04:47:21PM +, Rodriguez Betancourt, Esteban wrote: > The existing implementation uses a switch with > many conditions, that when compiled is translated > to a not optimal series of conditional jumps. > > With a lookup table the generated code has less conditional

[ovs-dev] [PATCH v2 1/1] json: Serialize strings using a lookup table

2016-10-05 Thread Rodriguez Betancourt, Esteban
The existing implementation uses a switch with many conditions, that when compiled is translated to a not optimal series of conditional jumps. With a lookup table the generated code has less conditional jumps, that should translate in improving the CPU ability to predict the jumps. Performance