Click here to Skip to main content
15,896,118 members
Articles / Programming Languages / Lua

Programming in ObjectScript 1.5

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
25 Mar 2013MIT22 min read 18.6K   125   4  
The ObjectScript is a new embedded programing language that mixes benefits of JavaScript, Lua, Ruby, Python and PHP. The ObjectScript has syntax from JavaScript, multiple results from Lua, sugar syntax from Ruby, magic methods from Python and much more.
{-1:"..\\Release\\profile_benchmark.exe","scripts\\test_fannkuch.os","9"}
8629
Pfannkuchen(9) = 30
time = 3.9093301312643041
OS script full time: 3.918909 secs
            gc time: 0.000505 secs (0.01%)

=== SET_PROPERTY, executed count: 9762270
sum time: 0.492232 secs (12.56%), avg time of 100000 times: 0.005042

=== MOVE, executed count: 12560269
sum time: 0.433301 secs (11.06%), avg time of 100000 times: 0.003450

=== GET_PROPERTY, executed count: 10447693
sum time: 0.391429 secs (9.99%), avg time of 100000 times: 0.003747

=== MOVE2, executed count: 8131552
sum time: 0.308502 secs (7.87%), avg time of 100000 times: 0.003794

=== JUMP, executed count: 8092648
sum time: 0.289668 secs (7.39%), avg time of 100000 times: 0.003579

=== ADD, executed count: 7304969
sum time: 0.277980 secs (7.09%), avg time of 100000 times: 0.003805

=== LOGIC_GE, executed count: 3722222
sum time: 0.153433 secs (3.92%), avg time of 100000 times: 0.004122

=== LOGIC_GREATER, executed count: 3565459
sum time: 0.134907 secs (3.44%), avg time of 100000 times: 0.003784

=== SUB, executed count: 3443808
sum time: 0.129066 secs (3.29%), avg time of 100000 times: 0.003748

=== LOGIC_EQ, executed count: 2977124
sum time: 0.118636 secs (3.03%), avg time of 100000 times: 0.003985

=== MUL, executed count: 322560
sum time: 0.011449 secs (0.29%), avg time of 100000 times: 0.003549

=== NEG, executed count: 181440
sum time: 0.006829 secs (0.17%), avg time of 100000 times: 0.003764

=== NEW_FUNCTION, executed count: 4
sum time: 0.000010 secs (0.00%), avg time of 100000 times: 0.256576

=== RETURN, executed count: 6
sum time: 0.000004 secs (0.00%), avg time of 100000 times: 0.068420

=== NEW_ARRAY, executed count: 3
sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.068420

=== NEW_OBJECT, executed count: 2
sum time: 0.000002 secs (0.00%), avg time of 100000 times: 0.076973

=== CALL_METHOD, executed count: 8
sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.012829

=== LOGIC_BOOL, executed count: 4
sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.012829

=== GET_UPVALUE, executed count: 5
sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.010263

=== CALL, executed count: 3
sum time: 0.000001 secs (0.00%), avg time of 100000 times: 0.017105

=== ALL OPCODES, executed count: 70512049
sum time: 2.747452 secs (70.11%), avg time of 100000 times: 0.003896

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions