Skip to content

Instantly share code, notes, and snippets.

View chfast's full-sized avatar

Paweł Bylica chfast

View GitHub Profile
@chfast
chfast / gist:b9871f4bddab05803199
Last active August 29, 2015 14:15
PerformanceTester
contract PerformanceTester {
function ackermann(uint m, uint n) returns (uint) {
if (m == 0)
return n + 1;
if (n == 0)
return ackermann(m - 1, 1);
return ackermann(m - 1, ackermann(m, n - 1));
}
define i32 @main() {
%buf = alloca i8, i32 24, align 16
%r = call i32 @llvm.eh.sjlj.setjmp(i8* %buf)
;%r = add i32 0, 1
%normal = icmp eq i32 %r, 0
br i1 %normal, label %Normal, label %Jump
Normal: