summaryrefslogtreecommitdiff
path: root/src/numfmt.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2014-05-02 01:23:21 +0100
committerPádraig Brady <P@draigBrady.com>2014-05-02 02:02:20 +0100
commitbe9f38bf6c7c228bc0d749703060228b16793167 (patch)
treed006fc1e14882ff39a258e6016c0cfcb839aabc6 /src/numfmt.c
parent10a96524355775e6d8533555f185656c7f29075c (diff)
downloadcoreutils-be9f38bf6c7c228bc0d749703060228b16793167.tar.xz
numfmt: improve processing throughput by 800%
The devmsg() calls that took quote_n() arguments, didn't normally output anything, but still incurred the overhead of those quote_n() calls. * src/numfmt.c (devmsg): Move the inline function with _internal_ enablement check to... * src/system.h: ...here as a variadic macro, with the enablement check at the outer level. * src/factor.c: As per numfmt.c but there is no performance change in this case. * NEWS: Mention the significant performance improvement.
Diffstat (limited to 'src/numfmt.c')
-rw-r--r--src/numfmt.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/numfmt.c b/src/numfmt.c
index c7448752c..e8f53fc3f 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -198,22 +198,6 @@ static int decimal_point_length;
/* debugging for developers. Enables devmsg(). */
static bool dev_debug = false;
-/* Like error(0, 0, ...), but without an implicit newline.
- Also a noop unless the global DEV_DEBUG is set.
- TODO: Replace with variadic macro in system.h or
- move to a separate module. */
-static inline void
-devmsg (char const *fmt, ...)
-{
- if (dev_debug)
- {
- va_list ap;
- va_start (ap, fmt);
- vfprintf (stderr, fmt, ap);
- va_end (ap);
- }
-}
-
static inline int
default_scale_base (enum scale_type scale)
{