When I look at the source, both are included. Some of the systems I run
it on do NOT have assembler versions. CRAY T-90, T-3E, J90, SV1.
>
>> Wouldn't it be more efficient if it could be implemented directly in the
>> language?
>
>No. You can not beat assembler. When you have REALLY time-consuming function
>it's better to do with assembler. And when you do not need to operate with
>data but just must move it around you do not need any support from language:
>char[something] will do just fine.
That is true for small sections of code (60-200 lines of assembler). After that
the programmer gets tired and ends up starting to make optimization errors.
(been there, done that. It wasn't fun either:)
As far as copying data around; char [something] won't quite do it. You end
up only passing the address of the array. Have to do:
typedef struct {
char data[something]
} data_type;
Then when:
data_type a, b;
you can say a = b and expect a copy of the structure. And if you do need
to reach
>
>On other hand if you have not-so-time-critical-functions such new syntax can
>help to write more clear code.
It would definitly clear it up.
....
>> I do think that an addition to the compiler (nonstandard of course) that
>> allowed integers to be defined as "int var : 36;" would be very usefull,
>> and may solve many related problems. I haven't addressed the use of
>> constants here... (um, how about ddddddddddddd:ddB form where d is a digit,
>> :dd is the length, and B is a base indicator - H for hex digits, D for
>> decimal)
>
>Ask gcc folks about such additions :-) You do not need ANSI or ISO approval
>to add such construct and use it (if you tried to compile open-source programs
>with, say, native Solaris compiler you seen that LOTS of open-source programs
>are written with usage of gcc extensions anyway).
If I can get some time, I may experiment with it just to see how hard it
would be to implement. (Optimization might be difficult..:)
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil
Any opinions expressed are solely my own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/