None of the above operations have a noticeable delay, even though the
lists have over 500 million elements due to line 3. The BList has two
key features that allow it to pull this off this performance:

Internally, a B+Tree is a wide, squat tree. Each node has a
maximum of 128 children. If the entire list contains 128 or fewer
objects, then there is only one node, which simply contains an array
of the objects. In other words, for short lists, a BList works just
like Python’s array-based list() type. Thus, it has the same good
performance on small lists.

The BList type features transparent copy-on-write. If a non-root
node needs to be copied (as part of a getslice, copy, setslice, etc.),
the node is shared between multiple parents instead of being copied.
If it needs to be modified later, it will be copied at that time.
This is completely behind-the-scenes; from the user’s point of view,
the BList works just like a regular Python list.