I am almost ready to post an article that partly uses Google v8, and I must say that Google v8 does not shine as much as I would want to in it.
The complete article is available here while I am working on the details: http://www.conceptualspeech.com/DigitalConceptBuilder_article/DigitalConceptBuilder.html Here are my concerns that I would appreciate fixed prior to the final submission (which I would want to happen next week). 1) v8.lib is 100 MB... That is absolutely not reasonable. I am under Win 32. I need some help in order to find a way to bring this to a reasonable level for distribution without requiring people to install v8's code and Python and scons is at all possible. 2) My pick of Google v8 was partially motivated by the statements that it is the fastest Javascript engine around. I am not convinced of that statement anymore. The execution of my code spends exactly the same amount of time if it compiles the Javascript repeatedly versus if it grabs the compiled Javascript from a cache. That is extremely surprising to me. The source code is available from the URL specified. If referring to ExecuteJavascriptString in JSObjectSupport.cpp, the area to investigate would be there. Handle<Value> ExecuteJavascriptString(Persistent<Context> context, string dSourceStr, string nameStr, bool skiptrace, Handle<Script> *dScript) throw(CMathematicalError) { Context::Scope context_scope(context); Handle<Value> result; Handle<String> source = String::New(dSourceStr.c_str()); Handle<Script> script; if (dScript == NULL) { Handle<Value> name = String::New(nameStr.c_str()); { TryCatch try_catch; script = Script::Compile(source, name); if (script.IsEmpty()) { String::AsciiValue error(try_catch.Exception()); string tmpString = *error; throw(new CMathematicalError(tmpString)); } } } else { script = *dScript; } ... } If the test "if (dScript == NULL)" is changed to "if (true)" then we bypass the cache. You should see that by doing that, there was close to no changes in the time spent calculating. That is extremely surprising as Javascript files are compiled many times for each test- case. If someone could help me realign my expectations or make the code changes in order to reach my expectations, I would appreciate the help. Thank you. -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
