Commit e796e899 authored by Taddeus Kroes's avatar Taddeus Kroes

Added a small optimization to possibility comparision.

parent b024e0c2
...@@ -13,6 +13,10 @@ def compare_possibilities(a, b): ...@@ -13,6 +13,10 @@ def compare_possibilities(a, b):
(pa, da), (pb, db) = a, b (pa, da), (pb, db) = a, b
ha, hb = pa.handler, pb.handler ha, hb = pa.handler, pb.handler
# Equal handlers means equal precedences
if ha == hb:
return 0
# Check if A and B have a precedence relative to eachother # Check if A and B have a precedence relative to eachother
if (ha, hb) in RELATIVE: if (ha, hb) in RELATIVE:
return -1 return -1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment