Skip to content
Snippets Groups Projects
Commit e796e899 authored by Taddeus Kroes's avatar Taddeus Kroes
Browse files

Added a small optimization to possibility comparision.

parent b024e0c2
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,10 @@ def compare_possibilities(a, b):
(pa, da), (pb, db) = a, b
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
if (ha, hb) in RELATIVE:
return -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment