[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] Re : How exactly inline works and should I inline all th
david . koch
[Tinycc-devel] Re : How exactly inline works and should I inline all the time?
Mon, 6 Dec 2021 11:23:20 +0100 (CET)
Inline is used very specifically where the code has to be fast.
Best is only to inline tiny parts of code that will be "inlined".
That's to say "injected" into the source code where it is needed.
Otherwise it is a full jump to a distant function, with context saving.
Hence the "inlining" only serves a very specific purpose.
----- Mail d'origine -----
De: rempas via Tinycc-devel <firstname.lastname@example.org>
À: Tinycc Devel <email@example.com>
Envoyé: Mon, 06 Dec 2021 09:35:19 +0100 (CET)
Objet: [Tinycc-devel] How exactly inline works and should I inline all the time?
I don't know if we must only post questions that are specific to the TCC
specifically (even tho this question can differ from compiler to compiler) or
make questions about C in general and in the case that the first is true then
inform me so I know. Anyway I wanted to ask how inline works specifically and
generally. I know generally that it "puts the source code" inline so we don't
have to use
"jmp" but is there anything else to it that I should know? Are there any
dangers or reasons
than someone should not use it? Also is there a way to tell the compiler to
function rather than always having to add the "inline" keyword?
Tinycc-devel mailing list