Nombas Logo: Simplicity and Power Through Scripting

Scripting

Products

Purchase

Download

Support

Company

Nombas > Products > ScriptEase ISDK > Faster & Smaller

 

ScriptEase JavaScript engine runs 2x faster than Microsoft and Netscape and uses up to 66% less memory.

The Nombas engineers are a difficult bunch to please. Other groups would have been satisfied to have produced the most useful, compliant, configurable script-integration SDK available. But that wasn't good enough for us; we wanted the ScriptEase Integration SDK to be both smaller and faster than any of the competition. And we did it.

We have done some recent comparison of the latest JavaScript interpreters from code from Nombas (ScriptEase), from Mozilla (JS32), and from Microsoft (WSH).

Speed

Running a script that is a balance of the types of operations a normal script would run, resulted in these times:

Interpreter Execution Time
(Smaller Is Better)

Interpreter Duration (in seconds)
Mozilla 174.5 seconds
Microsoft 141.5 seconds
Nombas 79.0 seconds

In the detailed results you can see how each interpreter compares doing various types of operations, but the overall results are that Nombas ScriptEase is 1.8 times faster than Microsoft and a blazing 2.2 times faster than Mozilla.

Memory Usage

The primary use of memory while interpreting JavaScript is used to manage objects. And so to compare the amount of memory used by each interpreter we created a simple script that creates many objects, and because objects generally have properties we also test when the objects have properties. To get the numbers we ran within an NT environment using the NT performance tools to determine how much memory each program was using when it reached stasis. These are the results of that run-time memory test:

Memory Used
(Smaller Is Better)

Test Mozilla Microsoft Nombas
Create 10,000 objects 1,292k 1,656k 620k
Create 20,000 objects 2,588k 3,264k 1,204k
Create 30,000 objects 3,932k 4,872k 1,924k
Create 10,000 objects w/50 properties each 45,952k 41,108k 20,172k

Nombas' ScriptEase:ISDK has been deployed on many embedded systems, where footprint can be critical, and so we have put much effort into maximizing the efficiency of memory use (while continuing to maximize performance--these two goals are often mutually exclusive).

Memory features not included in this report are compile-time options to use JSE_MIN_MEMORY, the ability to remove all or any part of unused objects, and the ability to override memory types (handle-based options).

The above numbers were for the 4.30 release. With the 4.40 release Nombas has concentrated on reducing the run-time size of the engine for use in smaller platforms, or for many instances on a single platform. For example, where in 4.30 each object may have required an average of 100 bytes for the ScriptEase engine (162 bytes for MS and 131 for Mozilla), the 4.40 engine can use just 36 bytes per object. memory use for virtual bytecodes, strings, and variable names have all been greatly reduced as well--and for all types 4.40 adds an options to use extended or moveable memory for these data types.

Additionally, for our 4.40 release, Device JavaScript on the PalmOS, a complete initialization of the engine and all of the standard ECMAScript object requires less than 10K of heap space (system overhead included) and a reasonable sized script allocated 1000 objects never uses more than 12K beyond that.

For complete details on the tests shown above, click here.


More Statistical Data (From Version 4.02)

As the following tables will show, ScriptEase ISDK delivers the highest performance and smallest footprint of any JavaScript engine.

Performance

The following Sieve and Sort tests, except for the JavaScript tests, were taken from Programming Language Benchmarks performed by Paul R. Clements Jr. at the Department of Computer Science at the University of South Carolina at Columbia, SC.

Because these tests were not all performed on the same system the relative values are not exact. We will provide the scripts to anyone wishing to perform similar tests.

Interpreter

Sort Time
min:sec.hun

Sieve Time
min:sec.hun

gcc v2.7.2

00:02.62

00:00.17

gawk v2.15.6

02:29.94

02:37.76

javac v1.0.2

02:24.04

00:09.95

mawk v1.3.3

00:46.52

00:31.13

perl v5.001

00:37.51

00:50.24

tcl v7.4

21:00:00

09:36.00

tcl v8.0

05:18.00

03:24.00

*

Navigator 4.04

09:53.00

06:27.00

IE 3.031

 NA2

02:50.00

ScriptEase 4.02

02:46.00

01:26.00

* JavaScript tests on a Pentium Pro 200 NT 4.0. Original tests on Pentium 100 running Linux.
1 Internet Explorer 4 has been optimized to run faster. When we get numbers on an identical machine we'll post those.
2 Internet Explorer unable to complete test

 

Size

Size is a critical issue for the embedded market, and the requirements vary between systems and vendor needs. We have made the ScriptEase:Integration SDK source code flexible to allow each ISV to choose what is important to them: speed, code size, data size, object models, or compliance-to-standards.

Example: The following example, SMALLJSE (available for download), is a DOS C++ application, built with the small model (near pointers, near code) and the following SE:ISDK options (these are by no means all of the options available):

  • DOS16
  • No huge pointers/data sizes
  • Buffer data-type added
  • 16-bit pointer size
  • No floating-point support
  • Include parser and compiler
  • Turn off faster memory pooling

Statistics for this particular example (approximate values):

Total Executable Size

62K

 - SE:ISDK code

41K

 - optional error strings

3K

 - sample app code

6K

 - app & C librray data

3K

 - C library and supporting libs

8K

Maximum Dynamic Data used by SE:ISDK

4060 bytes

  - to initialize engine and library

2292 bytes

  - for script execution

1768 bytes

 

For more information, pricing, and details, e-mail Sales at sales@nombas.com.

   
 
       

Home | Scripting | Products | Purchase | Download | Support | Company

Copyright ©2001, Nombas, Inc. All Rights Reserved.
Questions? Visit
http://support.nombas.com/