Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issues #315

Open
gogo40 opened this issue Mar 5, 2013 · 2 comments
Open

Performance issues #315

gogo40 opened this issue Mar 5, 2013 · 2 comments

Comments

@gogo40
Copy link
Member

gogo40 commented Mar 5, 2013

Hi, in my I3 with 2GB, Clever is with a bad performance. This is the benchmark result:

1) Computes the same 100-term polynomial 100,000 times inside a single function body
ref: http://dan.corlan.net/bench.html
running tests ....
-- Clever: 9.33593
-- PHP: 3.46506
-- Python: 2.70739
-- Ruby: 11.8761
2) Benchmark test for Single Threads
running tests .....
-- Clever: 2.86844
-- Lua: 0.621246
-- PHP: 1.21888
-- Python: 1.93079
-- Ruby: 9.61519

@gogo40
Copy link
Member Author

gogo40 commented Mar 5, 2013

I think is possible optimize code generation or execution to user function without user function calls like this:

import std.io;
import std.math;

function foo(x)
{
         var y = math:sqrt(x);
         var z = math:sqrt(y);
         return y + z;
}

io:println(foo(x));

@felipensp
Copy link
Member

I'm planing to change the Value::setObj method to do not copy the type members, instead using a lazy strategy to load the members to the instance, just performing such operation on OP_MCALL and OP_PROP_[WR] instructions. I've checked and it decreased 1sec on the polynomial test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants