MCPcopy Create free account
hub / github.com/anjo76/angelscript / TestArray2

Function TestArray2

sdk/tests/test_performance/source/test_array.cpp:42–60  ·  view source on GitHub ↗

The same function in C++ for comparison

Source from the content-addressed store, hash-verified

40
41// The same function in C++ for comparison
42void TestArray2(asIScriptEngine *engine)
43{
44 int val = 0;
45 CScriptArray *a = CScriptArray::Create(engine->GetTypeInfoByDecl("array<int>"), 1, &val);
46 for( asUINT i = 0; i < 2000000; i++ )
47 {
48 (*(int*)a->At(0))++;
49 (*(int*)a->At(0))++;
50 (*(int*)a->At(0))++;
51 (*(int*)a->At(0))++;
52 (*(int*)a->At(0))++;
53 (*(int*)a->At(0))++;
54 (*(int*)a->At(0))++;
55 (*(int*)a->At(0))++;
56 (*(int*)a->At(0))++;
57 (*(int*)a->At(0))++;
58 }
59 a->Release();
60}
61
62void Test(double *testTimes)
63{

Callers

nothing calls this directly

Calls 3

GetTypeInfoByDeclMethod · 0.45
AtMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected