Messages in this thread | | | Date | Tue, 7 Jan 2014 19:28:54 +0100 | Subject | Re: [PATCH] lib/vsprintf: add %pT[C012] format specifier | From | Geert Uytterhoeven <> |
| |
On Tue, Jan 7, 2014 at 6:56 PM, Pavel Machek <pavel@ucw.cz> wrote: >> The additional cost of using current vs NULL is ~zero. > > The additional cost of current vs NULL is cca 8 bytes per caller. Test > for NULL is cca 4 bytes, maybe 20 bytes total. I believe it is worth > it.
It depends (typical answer ;-)
On architectures that keep current in a register, the cost of using it is usually zero, as there's typically no difference between pushing a register or a zero on the stack, or moving a register or a zero to another register.
current_thread_info()->task is more expensive.
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |