Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add benchmark to show that push_cached_eh is _slow_ on deeply recure …

…functions.
  • Loading branch information...
commit ad8f0a87c2dc5f127164ee4328711bbd28ad4ceb 1 parent 06de726
Vasily Chekalkin bacek authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 examples/benchmarks/exceptions.pir
19 examples/benchmarks/exceptions.pir
View
@@ -36,6 +36,22 @@
.return ($P0)
.end
+.sub 'test_push_cached_eh_deeply'
+ .param int depth :optional
+ .param int has_depth :opt_flag
+
+ unless has_depth goto check
+ depth = 10000
+
+ check:
+ if depth !=0 goto recure
+ .tailcall "test_push_cached_eh"()
+
+ recure:
+ dec depth
+ "test_push_cached_eh_deeply"(depth)
+.end
+
.sub 'benchmark'
.param pmc sub
.param string desc
@@ -67,6 +83,9 @@
.const "Sub" test_push_cached_eh = "test_push_cached_eh"
"benchmark"(test_push_cached_eh, "push_cached_eh")
+ .const "Sub" test_push_cached_eh_deeply = "test_push_cached_eh_deeply"
+ "benchmark"(test_push_cached_eh_deeply, "push_cached_eh_deeply")
+
.const "Sub" test_push_eh = "test_push_eh"
"benchmark"(test_push_eh, "push_eh")
.end
Please sign in to comment.
Something went wrong with that request. Please try again.