Javascript Internals

 
 
 
 
 

by oldmoe

Value This
Doc
Scribd
Average
     
Pages: 59 43
Words: 2755 13640
Characters: 17982 81678
Lines: 234 623
     
     
Letters per word: 6.53 5.99
Words per line: 11.77 21.89
Words per page: 46.69 317.21

Add to your reading list

Flag_red Flag this document

Document Information

4,045 Reads | 0 Comments

Description

A Lengthy Introduction to Javascript

Pdf_16x16 59 Pages


Date Added

03/12/2008

Category

Uncategorized.

Tags
Groups
Copyright

Public Domain

More info »

 

or use Facebook Connect

kennethdakin1777

I am fairly new to javascript (and for that matter OOP) but I have been programming test/debugging systems for more than 40 years and also worked on the first (mainframe) spreadsheet at ICI in 1974. Is there anybody who can explain to me:- 1. why a simple conversion of a single byte (i.e char string with length =1) to a decimal value:- String.fromCharCode(n) is so relatively very very slow - when it should be one of the fastest operations around?? also, 2. why is testing a single char also so comparatively slow and has quite different speeds depending upon these various specifications. text.substr(0,1); text.substring(0,1); text[0]; 3. how much memory a 'typical' object occupies (a simple example might help with actual dec/hexlengths of the objects components) a. internally (as used by the j/s interpreter/engine) b. as a string (as expanded for exporting/external use) 4. whether an object (i.e. effectively its 'asString' value) is the same from one thread to another - in effect can objects be saved and restored faster than 'acquiring it' again - if the object has not changed (i.e. not the values, just the object). [I have still to be convinced of the real need for objects (having written extremely concice, efficient & bug free code without them for 40 years). Persuade me I have been doing something wrong !] Thanks Ken Dakin

12 / 29 / 2008