Large Data Sets: Use base variables or classes? And some binding questions
Patrick Sullivan
psully at gmail.com
Fri Sep 26 11:39:35 EDT 2008
Hello.
I will be using some large data sets ("points" from 2 to 12 variables)
and would like to use one class for each point rather than a list or
dictionary. I imagine this is terribly inefficient, but how much?
What is the cost of creating a new class?
What is the cost of referencing a class variable?
What is the cost of calling a class method to just return a variable?
Key point: The point objects, once created, and essentially non-
mutable. Static. Is there a way to "bind" a variable to a object
method in a way that is more efficient than the function calling
self.variable_name ?
I'll run some profile tests later today but if anyone has any cost/
efficiency of object creation in python, or any other idioms related
to variable creation, I'd greatly appreciate some links.
Thanks!
Patrick
More information about the Python-list
mailing list