mirror of
https://github.com/openvswitch/ovs
synced 2025-10-27 15:18:06 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user