X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/9e91c8e7b5fcdeb6389ac7ccbcd9c77348c4493a..4f634d205ba36abb1a9b0a0d81a2912f1b3ff96a:/lib/keyword.3?ds=inline diff --git a/lib/keyword.3 b/lib/keyword.3 index 88da56e..db5b86d 100644 --- a/lib/keyword.3 +++ b/lib/keyword.3 @@ -212,6 +212,17 @@ Argument vectors are rather inconvenient to use, but are the only practical way in which a caller can decide at runtime which arguments to include in a call, which is useful when writing wrapper functions. +.PP +Perhaps surprisingly, +keyword arguments have a relatively small performance impact. +On the author's aging laptop, +a call to a simple function, +passing two out of three keyword arguments, +takes about 30 cycles longer than +calling a standard function which just takes integer arguments. +On the other hand, +quite a lot of code is involved in decoding keyword arguments, +so code size will naturally suffer. . .SS Type definitions The header file defines two simple structure types. @@ -817,8 +828,9 @@ storing the results in It assumes that the first keyword name is in an argument named .BR kwfirst_ , -as set up by -.B KWTAIL marker described above. +as set up by the +.B KWTAIL +marker described above. .PP The macro expands both to a variable declaration and a statement: in C89, declarations must precede statements, @@ -892,7 +904,7 @@ If .I set is an identifier then .IP -.B "KWPARSE_EMPTY(" set ");" +.BI "KWPARSE_EMPTY(" set ");" .PP (note the lack of underscore) checks that the enclosing function has been passed