aboutsummaryrefslogtreecommitdiff
path: root/lib/dynamic-string.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-05-03 12:30:37 -0700
committerBen Pfaff <blp@nicira.com>2010-05-05 14:00:50 -0700
commit36c501fe7888bce761b5527dbd2ac7234543aef1 (patch)
treecec8aa175f7913a305810e1c11c2b8890bb9eb89 /lib/dynamic-string.c
parent836fad5e1ae4316752150fcdfba9afbf8d5f5801 (diff)
dynamic-string: Optimize ds_put_char().
A qprof profile showed ds_put_char() and ds_put_uninit() as 4% of total runtime. This commit inlines the common case, which reduces them to 1% total.
Diffstat (limited to 'lib/dynamic-string.c')
-rw-r--r--lib/dynamic-string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dynamic-string.c b/lib/dynamic-string.c
index c3338180..79a7d8ee 100644
--- a/lib/dynamic-string.c
+++ b/lib/dynamic-string.c
@@ -66,7 +66,7 @@ ds_put_uninit(struct ds *ds, size_t n)
}
void
-ds_put_char(struct ds *ds, char c)
+ds_put_char__(struct ds *ds, char c)
{
*ds_put_uninit(ds, 1) = c;
}