From: "maksis ." <maksis@adrenaline-network.com>
To: "musl@lists.openwall.com <musl@lists.openwall.com>"
<musl@lists.openwall.com>
Subject: towlower performance
Date: Thu, 25 May 2017 18:01:46 +0000 [thread overview]
Message-ID: <VI1P192MB011211DE6A9BDC8F4AF61CB6FBFF0@VI1P192MB0112.EURP192.PROD.OUTLOOK.COM> (raw)
[-- Attachment #1: Type: text/plain, Size: 860 bytes --]
Hi,
After switching my C++ app from a glibc-based build to a static build using musl, I've noticed significant differences in performance with certain loading operations, which seems to be related to using std::map with a case-insensitive UTF-8 sorting algorithm. For example, parsing a XML file with a flat listing of ~350k directory items and mapping them by name takes about 3 seconds with glibc vs 13 seconds with musl. After modifying the sort algorithm by removing all calls to towlower, the loading time with musl drops to 3.5 seconds.
I put together a C++ benchmark with the same sorting algorithm, which seems to produce similar results (GCC 6.3, 64 bit, -O3):
https://gist.github.com/maksis/92ad04f525d69043283350675d04f160
glibc: ~2 seconds (Arch Linux)
musl: ~7 seconds (Alpine Linux 3.6.0)
What might be causing the difference?
[-- Attachment #2: Type: text/html, Size: 2597 bytes --]
next reply other threads:[~2017-05-25 18:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 18:01 maksis . [this message]
2017-05-27 0:39 ` Andre McCurdy
2017-05-27 0:59 ` Rich Felker
2017-05-30 12:23 ` [PATCH] towupper/towlower: fast path for ascii chars Natanael Copa
2017-05-31 3:04 ` A. Wilcox
[not found] <1871525485.1112020.1495912199619.ref@mail.yahoo.com>
2017-05-27 19:09 ` towlower performance Brad Conroy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1P192MB011211DE6A9BDC8F4AF61CB6FBFF0@VI1P192MB0112.EURP192.PROD.OUTLOOK.COM \
--to=maksis@adrenaline-network.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).