This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] sort and group case labels


> 	(gimplify_switch_expr): Sort case labels, and make sure the
> 	last label in the label vector is the default case.

That's an O(N^2) sort - that performs rather poorly when you compile
a yacc grammer or an interpreter.

We parse the case labels into an AVL tree or a splay tree, so where do
the trees loose their order?  I would consider this to be a bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]