diff options
| author | Jack Nagel | 2014-04-02 20:29:20 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-02 20:29:20 -0500 |
| commit | c13311ca09062d2c0cf15c51a5071ff8c645bc83 (patch) | |
| tree | 6ca1c4ad67b130f3ff3ba9ac15ee92a811c7cb11 /Library/Homebrew/test | |
| parent | bb5e0812fb387f2b2a920c9a89e9750fe28943f8 (diff) | |
| download | brew-c13311ca09062d2c0cf15c51a5071ff8c645bc83.tar.bz2 | |
Cache MacOS.version comparison results
MacOS.version#<=> is called many, many times during formula loading with
the same half dozen or so arguments. A typical call to this method
involves:
* a hash lookup to convert a symbol argument to a string
* creation of a throw-away Version object wrapping the argument
* the actual version comparison, which is not cheap
This makes it a prime candidate to be memoized.
Diffstat (limited to 'Library/Homebrew/test')
0 files changed, 0 insertions, 0 deletions
