aboutsummaryrefslogtreecommitdiff
path: root/tests/embind
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-04-11 16:29:52 +0300
committerJukka Jylänki <jujjyl@gmail.com>2013-04-18 20:08:24 +0300
commit001ef88766b1baaa81e7975309afcb7640cd5175 (patch)
tree08e8f00a7eee7b0345a4a50f32fb2077d1aaed02 /tests/embind
parentc7cfcda3ad9a8a21438b32ca9fe79baeb4bdfeda (diff)
Remove clang inlining to level the profiling comparison against 'dynamic' runtime dispatch between JS and JS embind.
Diffstat (limited to 'tests/embind')
-rw-r--r--tests/embind/embind_benchmark.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/embind/embind_benchmark.cpp b/tests/embind/embind_benchmark.cpp
index 91efa4af..4a472686 100644
--- a/tests/embind/embind_benchmark.cpp
+++ b/tests/embind/embind_benchmark.cpp
@@ -66,13 +66,13 @@ public:
Vec3 rot;
float scale;
- Vec3 GetPosition() { return pos; }
- Vec3 GetRotation() { return rot; }
- float GetScale() { return scale; }
+ Vec3 __attribute__((noinline)) GetPosition() const { return pos; }
+ Vec3 __attribute__((noinline)) GetRotation() const { return rot; }
+ float __attribute__((noinline)) GetScale() const { return scale; }
- void SetPosition(const Vec3 &pos_) { pos = pos_; }
- void SetRotation(const Vec3 &rot_) { rot = rot_; }
- void SetScale(float scale_) { scale = scale_; }
+ void __attribute__((noinline)) SetPosition(const Vec3 &pos_) { pos = pos_; }
+ void __attribute__((noinline)) SetRotation(const Vec3 &rot_) { rot = rot_; }
+ void __attribute__((noinline)) SetScale(float scale_) { scale = scale_; }
};
typedef std::shared_ptr<Transform> TransformPtr;
@@ -85,7 +85,7 @@ public:
}
std::shared_ptr<Transform> transform;
- TransformPtr GetTransform() { return transform; }
+ TransformPtr __attribute__((noinline)) GetTransform() const { return transform; }
};
typedef std::shared_ptr<GameObject> GameObjectPtr;