diff options
author | Ben Pfaff <blp@nicira.com> | 2010-05-03 12:30:37 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-05-05 14:00:50 -0700 |
commit | 36c501fe7888bce761b5527dbd2ac7234543aef1 (patch) | |
tree | cec8aa175f7913a305810e1c11c2b8890bb9eb89 /lib/dynamic-string.c | |
parent | 836fad5e1ae4316752150fcdfba9afbf8d5f5801 (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.c | 2 |
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; } |