def __init__(self): self.log_file = '' self.deleted_code = [] self.vm_extent = {} self.js_entries = splaytree.SplayTree() self.cpp_entries = splaytree.SplayTree() self.total_number_of_ticks = 0 self.number_of_library_ticks = 0 self.unaccounted_number_of_ticks = 0 self.excluded_number_of_ticks = 0
def __init__(self): self.log_file = '' self.deleted_code = [] self.vm_extent = {} # Map from assembler ids to the pending assembler objects self.pending_assemblers = {} # Map from code addresses the have been allocated but not yet officially # created to their assemblers. self.assemblers = {} self.js_entries = splaytree.SplayTree() self.cpp_entries = splaytree.SplayTree() self.total_number_of_ticks = 0 self.number_of_library_ticks = 0 self.unaccounted_number_of_ticks = 0 self.excluded_number_of_ticks = 0 self.number_of_gc_ticks = 0 # Flag indicating whether to ignore unaccounted ticks in the report self.ignore_unknown = False
import splaytree, randomizedst import time print("[+] Loading IV...") iv = [] file = open("iv.txt", "r") for line in file: iv.append(int(line)) print("[ ] IV loaded!\n") st = splaytree.SplayTree() rst = randomizedst.RandomizedSplayTree(1) print("[+] Insert IV values in Splay Tree... ") start_time = time.time() for i in iv: st.insert(i) print("--- %s seconds ---" % (time.time() - start_time)) print("[ ] Done\n") print("[+] Insert IV values in Randomized Splay Tree... ") start_time = time.time() for i in iv: rst.insert(randomizedst.Node(i)) print("--- %s seconds ---" % (time.time() - start_time)) print(f"[ ] Done (with {rst.getSplayn()} splays)\n")