Re: [NTLK] Drawbacks of C / C++ vs. Newtonscript?

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Sat Oct 05 2002 - 18:39:15 EDT


À (At) 0:23 -0700 28/09/02, J. Eagan Rackley écrivait (wrote) :
>Say, I have to continually call a C loop over and over again to run
>a routine I need in my program. Will this create more of a
>performance hit than just calling a newtonscript routine over and
>over again (saying the routines performed similarly, and assuming
>I'm just passing pointers to structs that would not need any
>conversion/casting to a useable C type))?

C++ is definitely faster, for thousands of reasons.

Do you know by chance MacOS mixed mode manager? They have nice pages
on patches to be written in 68K or PPC. This more or less applies to
NewtonOS with NewtonScript (interpreted) and C++ (native). If you
call plenty of NewtonScript functions within a C++ code, the benefit
is low. If you don't, it's pretty high. But there's always a benefit.
However, some parts cannot be done in pure C++. And doing a native
function to just set a slot in a frame is completely stupid and
useless.
So you'd better stick with: NewtonScript for every GUI part.
C++ for the main loop of your emulators.

Paul

-- 
NPDS: http://newton.kallisys.net:8080/
Apache: http://www.kallisys.com/

-- Read the List FAQ/Etiquette: http://www.newtontalk.net/faq.html Read the Newton FAQ: http://www.chuma.org/newton/faq/ This is the NewtonTalk mailing list - http://www.newtontalk.net/



This archive was generated by hypermail 2.1.2 : Thu Oct 31 2002 - 12:02:09 EST