[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Type-error in C code
From: |
Stefan Monnier |
Subject: |
Re: Type-error in C code |
Date: |
Tue, 16 Nov 2010 12:05:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
>> Same problem as the structs type: it's not optimized as well as the
>> int/long... types.
> May I ask any references about that?
> Not that I don't trust you, but I'd like to know why.
IIRC calling conventions usually dictate that non-scalar types get
passed via copies on the stack rather than in registers.
Also of course, in general structs can't be handled in the same way as
int/long/... by the compiler, so in order to handle single-slot structs
efficiently, the compiler needs to special case these. I'd expect
a mature C compiler to go through the trouble to try and special-case
them, but that's no guarantee that it's going to be as efficient as just
scalar types.
Stefan
- Re: Type-error in C code, (continued)
- Re: Type-error in C code, Stefan Monnier, 2010/11/15
- Re: Type-error in C code, Julien Danjou, 2010/11/15
- Re: Type-error in C code, Andreas Schwab, 2010/11/15
- Re: Type-error in C code, Stefan Monnier, 2010/11/16
- Re: Type-error in C code, Julien Danjou, 2010/11/16
- Re: Type-error in C code, Stephen J. Turnbull, 2010/11/16
- Re: Type-error in C code, Julien Danjou, 2010/11/16
- Re: Type-error in C code, Stephen J. Turnbull, 2010/11/16
- Re: Type-error in C code, Stefan Monnier, 2010/11/16
- Re: Type-error in C code, Julien Danjou, 2010/11/16
- Re: Type-error in C code,
Stefan Monnier <=
- Re: Type-error in C code, Andreas Schwab, 2010/11/16