mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Add profile test for cpp call perf
This commit is contained in:
parent
0a143d1cd3
commit
e21c8f87b4
21
contrib/codeanalysis/profile_cpp_calls.chai
Normal file
21
contrib/codeanalysis/profile_cpp_calls.chai
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
var test_str = "bob was a string";
|
||||||
|
|
||||||
|
for( var i = 0; i < 200000; ++i)
|
||||||
|
{
|
||||||
|
test_str.size();
|
||||||
|
// test_str.find("a", i);
|
||||||
|
test_str.c_str();
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str.erase_at(1);
|
||||||
|
test_str = "bob was a string";
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user