Re: [Qemu-devel] [PATCH v8 04/17] qapi-introspect: Guarantee particular sorting

2015-10-30 Thread Eric Blake
On 10/30/2015 05:20 AM, Markus Armbruster wrote: > For now, only high-level review. > > The main cost of sorting is interface complexity: we need to specify > which things are sorted, and what the sorting order is (see your TODO > below). Once we've done so, we can't go back. > > There's also im

Re: [Qemu-devel] [PATCH v8 04/17] qapi-introspect: Guarantee particular sorting

2015-10-30 Thread Markus Armbruster
For now, only high-level review. The main cost of sorting is interface complexity: we need to specify which things are sorted, and what the sorting order is (see your TODO below). Once we've done so, we can't go back. There's also implementation complexity, but your patch shows it's low enough t

[Qemu-devel] [PATCH v8 04/17] qapi-introspect: Guarantee particular sorting

2015-10-28 Thread Eric Blake
Sorting the values of an enum makes it easier to look up whether a particular value is present, via binary rather than linear search (probably most visible with QKeyCode, which has grown over several releases). Additionally, QMP clients need not know which C value is associated with an enum name,