Python & Music: Performance question
Max M
maxm at mxm.dk
Sun Apr 6 10:43:44 EDT 2003
David Asorey Álvarez wrote:
> Hello, group.
>
> I'm developing a small music program, and I have some doubts.
>
> I want define a class, Note, which represents a note. It has two
> attributes, pitch and duration (quarter note, half note, etc). There
> will be a lot of instances of this object, maybe hundreds of notes,
> and the program needs access to all of this objects and read its
> attributes.
> Which implementation will be more efficient?
It is premature optimisation. First you should just get it to work, and
then you should optimize if there are any problems.
No matter how many notes you have, it will make no problems for you on a
reasonably moderne computer.
hilsen/regards Max M Rasmussen, Denmark
http://www.futureport.dk/
Fremtiden, videnskab, skeptiscisme og transhumanisme
More information about the Python-list
mailing list