Nasal performance and benchmarks: Difference between revisions

m
no edit summary
(add test descriptions and first results)
mNo edit summary
Line 28: Line 28:
For most real-world cases this should be neglectible, nevertheless it is a simple, easy to understand test scenario.
For most real-world cases this should be neglectible, nevertheless it is a simple, easy to understand test scenario.


<nowiki>
<syntaxhighlight lang="nasal">
var simpleClass = {
var simpleClass = {
     new: func {
     new: func {
Line 56: Line 56:
     c.value = 1;
     c.value = 1;
}
}
</nowiki>
</syntaxhighlight>


=== property tree access ===
=== property tree access ===
Line 62: Line 62:
This benchmarks compares the getprop() agains the props.Node.getValue().
This benchmarks compares the getprop() agains the props.Node.getValue().


<nowiki>
<syntaxhighlight lang="nasal">
var myprops = [];
var myprops = [];
var path = "/_benchmark/getprop/prop";
var path = "/_benchmark/getprop/prop";
Line 85: Line 85:
printResult("test_getvalue", debug.benchmark_time(test_getvalue, 1));
printResult("test_getvalue", debug.benchmark_time(test_getvalue, 1));
printResult("test_getprop", debug.benchmark_time(test_getprop, 1));
printResult("test_getprop", debug.benchmark_time(test_getprop, 1));
</nowiki>
</syntaxhighlight>


=== Canvas API - Text class ===
=== Canvas API - Text class ===
252

edits