Update n-body sources and binary for rust. Add bench results (#172)

This commit is contained in:
Max Graey
2018-07-21 15:11:39 +03:00
committed by Daniel Wirtz
parent 00fb45fcad
commit 813d2e33c8
15 changed files with 704 additions and 779 deletions

View File

@ -10,14 +10,13 @@
(type $iF (func (param i32) (result f64)))
(type $iv (func (param i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(import "env" "memory" (memory $0 1))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $assembly/index/system (mut i32) (i32.const 0))
(memory $0 1)
(data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
(export "memory" (memory $0))
(export "init" (func $assembly/index/init))
(export "getBody" (func $assembly/index/getBody))
(export "step" (func $assembly/index/step))
(export "bench" (func $assembly/index/bench))
(start $start)
@ -823,50 +822,7 @@
)
)
)
(func $assembly/index/getBody (; 7 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
(tee_local $0
(if (result i32)
(i32.lt_u
(get_local $0)
(i32.load offset=4
(tee_local $1
(i32.load
(get_global $assembly/index/system)
)
)
)
)
(if (result i32)
(i32.lt_u
(get_local $0)
(i32.shr_u
(i32.load
(tee_local $1
(i32.load
(get_local $1)
)
)
)
(i32.const 2)
)
)
(i32.load offset=8
(i32.add
(get_local $1)
(i32.shl
(get_local $0)
(i32.const 2)
)
)
)
(unreachable)
)
(i32.const 0)
)
)
)
(func $assembly/index/NBodySystem#advance (; 8 ;) (type $iFv) (param $0 i32) (param $1 f64)
(func $assembly/index/NBodySystem#advance (; 7 ;) (type $iFv) (param $0 i32) (param $1 f64)
(local $2 i32)
(local $3 f64)
(local $4 i32)
@ -1170,7 +1126,7 @@
)
)
)
(func $assembly/index/NBodySystem#energy (; 9 ;) (type $iF) (param $0 i32) (result f64)
(func $assembly/index/NBodySystem#energy (; 8 ;) (type $iF) (param $0 i32) (result f64)
(local $1 f64)
(local $2 i32)
(local $3 i32)
@ -1367,7 +1323,7 @@
)
(get_local $1)
)
(func $assembly/index/step (; 10 ;) (type $F) (result f64)
(func $assembly/index/step (; 9 ;) (type $F) (result f64)
(call $assembly/index/NBodySystem#advance
(get_global $assembly/index/system)
(f64.const 0.01)
@ -1376,7 +1332,7 @@
(get_global $assembly/index/system)
)
)
(func $assembly/index/bench (; 11 ;) (type $iv) (param $0 i32)
(func $assembly/index/bench (; 10 ;) (type $iv) (param $0 i32)
(local $1 i32)
(block $break|0
(loop $repeat|0
@ -1400,7 +1356,7 @@
)
)
)
(func $start (; 12 ;) (type $v)
(func $start (; 11 ;) (type $v)
(set_global $~lib/allocator/arena/startOffset
(i32.const 40)
)