eC performance vs C or C++

14 views
Skip to first unread message

Sam Hu

unread,
Sep 16, 2008, 11:35:30 PM9/16/08
to eC Programming Language
Hi Jerome,

Just curious have you ever compared the performance an eC program with
which written in C or C++,I knew you have mentioned that it is almost
the same with C,but just wanna know some more information since I have
no clue of the ec design mechanism, for example,any performance
penatly in somewhere when using eC compare to c or c++?

Thanks and regards,
Sam

Jerome St-Louis

unread,
Sep 16, 2008, 11:56:29 PM9/16/08
to ec-programm...@googlegroups.com
Hi Sam,

First, eC is fully compatible with C. So anywhere in your eC code you can write regular C code and naturally get the same C performance, since the C code will simply be compiled as it is (native).

eC also adds many object oriented features, which are compiled (currently into C code, then object code) which I designed with the idea of speed and performance in mind. eC has a lot of dynamism, but most of what allows for this is all done at initialization time (when the program starts up). However even this happens very fast, as the quick load-up time of the Ecere IDE can demonstrate. So in short, the performance of eC object oriented features should be comparable to those of C++. I haven't really done any benchmark yet, as I've never felt any speed issue from the language. If one was to benchmark eC, we might find places where to optimize, but I believe eC already screams of performance.

I suggest you give eC a try, and if you ever have any performance issue with the language don't hesitate to let me know. Otherwise there's really nothing to be worried about, eC is fast.

Regards,

Jerome

Sam Hu

unread,
Sep 17, 2008, 2:03:23 AM9/17/08
to eC Programming Language
Hi Jerome,

Thanks .Actually I asked this because when I run the example program
test3D in the example folder and I found there is about 6-7 seconds'
wait for the start up of the program.I don't know whether this is OK.

I tried the examples in the DAO and find some of them can not run in
my pc,do not know whether it is a problem of xp or a bug of eC,I will
post them here when I have time.

Cheers,
Sam

Jerome St-Louis

unread,
Sep 17, 2008, 2:26:29 AM9/17/08
to ec-programm...@googlegroups.com
Hi Sam,

The performance problems are usually due to other reasons than the actual eC performance.

In this case, if you look at the code carefully, that sample loads a texture from the ecere.com website.


That's where these seconds are spent.

The 3D samples might not work properly if you have bad or touchy display drivers. On Windows, try selecting Direct3D instead (displayDriver = "Direct3D") if OpenGL doesn't seem to work.

Regards,

Jerome
Reply all
Reply to author
Forward
0 new messages