def main():
fp = open('testkeys.txt', 'w')
fp.write(repr(keys))
fp.close()
print("Nodes: %d" % len(keys))
shuffle(keys)
t = Timer("rb_pop_min()", setup_RBTree)
print_result(t.timeit(COUNT), 'RBTree pop_min')
t = Timer("rb_pop_max()", setup_RBTree)
print_result(t.timeit(COUNT), 'RBTree pop_max')
t = Timer("crb_pop_min()", setup_FastRBTree)
print_result(t.timeit(COUNT), 'FastRBTree pop_min')
t = Timer("crb_pop_max()", setup_FastRBTree)
print_result(t.timeit(COUNT), 'FastRBTree pop_max')
评论列表
文章目录