On 23/04/18 09:55, jack4747@gmail.com wrote:
> Il giorno lunedì 23 aprile 2018 10:16:01 UTC+2, Gordon Henderson ha scritto:
>
>> I have looked at compiling my BASIC to native code - and there is more
>> or less a 1:1 relationship with a line of BASIC and a Line/Block of ASM
>> - it's no-where near efficient as C though (and 'compiling' BASIC into
>> C is just as easy and may actually result in faster code, but that's a
>> job for another day)
>
> It's not that C is inherently efficient, it's the compiler that optimize the
asm.
> If you compile a C source code with optimization disabled, you'll get a
(almost) 1:1 relationship line of C : line of asm.
>
> Bye Jack
>
I think that is only half of it: The other half is that C IS assembler,
written in shorthand. I cannot offhand think of any native c operation
that is not an atomic assembler operation.
Ok sometimes on some processors operation on the contents of memory are
two opcodes.
The difference with for example C++ is astonishing.
--
“it should be clear by now to everyone that activist environmentalism
(or environmental activism) is becoming a general ideology about humans,
about their freedom, about the relationship between the individual and
the state, and about the manipulation of people under the guise of a
'noble' idea. It is not an honest pursuit of 'sustainable development,'
a matter of elementary environmental protection, or a search for
rational mechanisms designed to achieve a healthy environment. Yet
things do occur that make you shake your head and remind yourself that
you live neither in Joseph Stalin’s Communist era, nor in the Orwellian
utopia of 1984.”
Vaclav Klaus
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|