Closed qizhou closed 2 years ago
Original zplot() is slow for a large number of xs because of root.insert(0,0). This optimization preallocates root so the total cost is O(n) (instead of O(n^2))
xs
root.insert(0,0)
root
Pref numbers (len(xs) = 128))
Original zplot() is slow for a large number of
xs
because ofroot.insert(0,0)
. This optimization preallocatesroot
so the total cost is O(n) (instead of O(n^2))Pref numbers (len(xs) = 128))