filterAxiom is more resource-intensive than alreadyWrittenTPTPs.contains so alreadyWrittenTPTPs.contains check is pushed before filterAxiom.
alreadyWrittenTPTPs was an ArrayList but it used only to check the presence of formula as alreadyWrittenTPTPs.contains. Replaced with HashSet as more efficient for this scenario.
Improves performance of SUMOKBtoTPTPKB locally from 15 to 8 min.
filterAxiom
is more resource-intensive thanalreadyWrittenTPTPs.contains
soalreadyWrittenTPTPs.contains
check is pushed beforefilterAxiom
.alreadyWrittenTPTPs
was an ArrayListalreadyWrittenTPTPs.contains
. Replaced with HashSet as more efficient for this scenario.Improves performance of
SUMOKBtoTPTPKB
locally from 15 to 8 min.