• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Object oriented javascript question

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How does object oriented JavaScript impact performance? How does an object oriented solution compare to a procedural solution performance wise?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The short answer is minimal if any. There are several assumptions made regarding your question...first, that the code written is optimal itself. The main benefit of using OO JavaScript in my opinion is the ability to utilize polymorphism and design patterns in JavaScript. While I have not read anything stating there is overhead with loading the source, I can imagine that there is more overhead, than if the script was contained in the body to begin with, but that would defeat the purpose to begin with, since another desire is to modularize your code so you dont have cut-n-paste snippets everywhere.
 
author
Posts: 85
5
PHP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
totally agreed with B Webb! This would be a micro-optimization and chances are there are other ares that give you "more bang for your buck".

I posted some more optimization thoughts in this thread
 
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic