4254 shaares
5 results
tagged
DataStructures
Can't I just get the data, without it being turned into objects?
We'll use this mechanism to convert tagged nodes to almost-native types, while preserving the tags.It's likely possible to handle [undefined tag prefixes and undefined aliases] in a way similar to how we handled undefined tags
A very clear and detailed article!
TL;DR:
- List Resizing : the backing array is grown by approximately 12% (in Java ArrayList grows by 50% when expanded2 and in Ruby, Array grows by 100%). The Python implementation optimizes for memory usage over speed. Another reason to preallocate Python lists when possible.
- Inserting at the beginning of a list takes linear time. Sometimes, better use Deques which trade constant time insert and remove from both ends in exchange for constant time indexing.
By Russel Cohen
Savannah is a central point for development, distribution and maintainance of Free Software. It allows contributors to easily join existing Free Software projects.