tspeterkim/PDB-Evaluator

speedup_finalvar_subsitution

Opened this issue · 0 comments

This branch aims to speed up the final step of subsitution (e.g. original query = P(x1, x2, x3) ... final step = P(0, 1, x3)

Instead of making several calls to subsitute x3, simply query for all rows where x1=0 and x2=1 and multiply.

Along with this change I added some useful helper programs:

  • lift.py -- above changes
  • speedup_test.py -- simplest form of running a program many times and calculating avg time spent
  • data/table_files/generate_table.py -- helps create large tables like the T4.txt I created
  • data/table_files/T4.txt -- above mentioned table

The Speedup is especially effective when dealing with T4.

  • On the original small query: w/ speedup = 0.001 // w/o speedup = 0.0012
  • On query using T4: w/ speedup = 0.004 // w/o speedup = 0.133

However, currently my implementation and the original are returning different results, but I think some additional math needs to be checked here...will confer with you guys later