diff options
author | Frédéric Bron <frederic.bron@m4x.org> | 2013-08-23 17:30:34 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2013-09-10 03:15:34 +0200 |
commit | 00216e16c717470ae53dbbfd1d52850d1b102e29 (patch) | |
tree | 09a68e777977b2dd6e9c85a69fd103eb1d076474 /flower/include/file-name.hh | |
parent | c0a691181c981f55ef28e5daa8410b41e37ef808 (diff) |
Issue 3531: replaced function argument 'string' by 'const string&' where it makes sense to avoid unnecessary copying of 'string' objects.
Measurements on x86_64 (i7-2760QM, 2.40GHz) Fedora 19 with g++ 4.8.1, with
configure --enable-optimising --disable-debugging; tests run 10 times, average
elapsed time compared (/usr/bin/time)
* Bach, Concerto in E major or violin and strings, BWV 1042 (Mutopia source),
38 pages:
$ lilypond score.ly -> master: 15.4s, with patch: -0.1%
* lilypond regression tests (1153 .ly files):
$ lilypond *.ly -> master: 276.6s, with patch: -2.5%
Diffstat (limited to 'flower/include/file-name.hh')
-rw-r--r-- | flower/include/file-name.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flower/include/file-name.hh b/flower/include/file-name.hh index b30dd9cd5b..4822783fc6 100644 --- a/flower/include/file-name.hh +++ b/flower/include/file-name.hh @@ -23,7 +23,7 @@ #include "std-vector.hh" #include "std-string.hh" -std::string dir_name (std::string file_name); +std::string dir_name (const std::string &file_name); std::string get_working_directory (); class File_name |