Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Is object-orientated programming slower than procedural?

Author
Message
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 16th Jun 2003 00:45 Edited at: 16th Jun 2003 00:46
The running of the program that is, not the typing of code.
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 16th Jun 2003 00:47
It can be due to the ability to overload functions etc. Usually its not noticable...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jun 2003 01:18 Edited at: 16th Jun 2003 01:19
I would only worry about it for a huge application, or a very intensive application.

Even then, the benefits usually outweigh the disadvantages. And we'll be on 6 - 8 GHz processors in 3 years.

Thanks in advance.
All the Best,
StevieVee
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 16th Jun 2003 06:42
depends what your doing... and the languages you have in mind...
most of the time its a case of the right tool for the right job.

example would be Drivers for say a USB Joypad.
you would use the OOL C++ to interface the retrieved data to DirectX, however you'd use ASM to actually gather the data.

you do this because C++ has the interaction level to interface devices and carry out multiple operations at one time, whereas ASM you can read devices/port data directly in realtime ... this allows the device to be in sync rather than having to wait for the program sync.

Shaders are another example of when you can do this, however HLSL & Cg are changing this fact so you can use a Higher Descriptive Language.

that said, a proc langauage like PureBASIC would hold no intrinsic speed over C++ ... they both compile and run at basically the same speed - C++ will run slightly slower due to the overhead of the OOL, however on the whole that overhead is approx .006ns/operation so it isn't likely to really affect you.

Within the Epic battle of the fates the Shadow and the Angel will meet. With it will harbinger the very fight of good vs evil!
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 16th Jun 2003 19:28
Thanks. I was just curious as I was revising my computing A-Level and the question occurred to me.

Login to post a reply

Server time is: 2024-09-20 02:41:02
Your offset time is: 2024-09-20 02:41:02