Home » Developing U++ » UppHub » AngelScript - AngelCode Scripting Library
Re: AngelScript - AngelCode Scripting Library [message #36757 is a reply to message #34353] |
Tue, 03 July 2012 04:30  |
Sender Ghost
Messages: 301 Registered: November 2008
|
Senior Member |
|
|
The AngelScript archive updated to 2.24.0a version.
Also I updated UppCompiler archive (in attachment) with changes of 2.24.0a version and ScopeRelease helper class template for releasing resources on scope completion (e.g. for asIScriptEngine, asIScriptContext objects, which have Release virtual methods):
Toggle source code
template<class T>
class ScopeRelease {
protected:
T *object;
public:
ScopeRelease() : object(0) { }
ScopeRelease(T *x) : object(x) { }
~ScopeRelease() { if (object) object->Release(); }
ScopeRelease& operator=(T *x) { object = x; return *this; }
T *GetObject() { return object; }
T *operator->() { return object; }
T *operator~() { return object; }
bool operator==(T *x) { return object == x; }
bool operator!=(T *x) { return object != x; }
virtual bool Release()
{ // In case you need to release the object before the scope completion.
if (object) {
object->Release();
object = 0;
return true;
}
return false;
}
};
With following results for 2.24.0a version:
1 / (1 - x * y + x - y) = -0.01851851852
fn->Execute() = -0.01851851852
sum = 5190404.858
sum = 5190404.858
sum = 5190404.858
sum = 5190404.858
sum = 5190404.858
TIMING AngelScript (fully interpreted): 78.00 ms - 78.00 ms (78.00 ms / 1 ), min: 78.00 ms, max: 78.00 ms, nesting: 1 - 1
TIMING AngelScript (interpreted): 321.00 ms - 321.00 ms (321.00 ms / 1 ), min: 321.00 ms, max: 321.00 ms, nesting: 1 - 1
TIMING Direct : 13.00 ms - 13.00 ms (13.00 ms / 1 ), min: 13.00 ms, max: 13.00 ms, nesting: 1 - 1
TIMING Compiled : 53.00 ms - 53.00 ms (53.00 ms / 1 ), min: 53.00 ms, max: 53.00 ms, nesting: 1 - 1
TIMING Interpreted : 837.00 ms - 837.00 ms (837.00 ms / 1 ), min: 837.00 ms, max: 837.00 ms, nesting: 1 - 1
[Updated on: Wed, 20 November 2013 15:42] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Aug 28 20:35:35 CEST 2025
Total time taken to generate the page: 0.00791 seconds
|