cornedriesprong / mingus

Automatically exported from code.google.com/p/mingus
GNU General Public License v3.0
0 stars 0 forks source link

Recognizing chords: Performance enhancement #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The chords.determine function is pretty fast already, but it could use some
caches and optimizations.

Original issue reported on code.google.com by Rhijnauwen@gmail.com on 7 Sep 2008 at 4:39

GoogleCodeExporter commented 9 years ago
Removing tail recursion would probably be a big win, but I think we need some
profiling to tell where the bottleneck is.

Original comment by Rhijnauwen@gmail.com on 25 Dec 2008 at 8:40

GoogleCodeExporter commented 9 years ago
Rewrote the pattern matching in determine_triad, which is faster, more readable 
and
(21 lines) shorter. The other functions should also be rewritten. 

See 
http://code.google.com/p/mingus/source/browse/trunk/mingus/core/chords.py#1122

The inversion_exhauster should be a separate function.

Original comment by Rhijnauwen@gmail.com on 7 Mar 2009 at 10:55

GoogleCodeExporter commented 9 years ago
Since the determine_triad function now compares a bunch strings, we might as 
well
replace it with a dict to make it O(1).

Original comment by Rhijnauwen@gmail.com on 17 Mar 2009 at 11:17

GoogleCodeExporter commented 9 years ago

Original comment by Rhijnauwen@gmail.com on 18 May 2011 at 7:29