Skip to content

Commit afb8fe7

Browse files
MaxGraeydcodeIO
authored andcommitted
Update Rust n-body build (AssemblyScript#294)
1 parent 376afd4 commit afb8fe7

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/n-body/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ Benchmark
3131

3232
***Environment:***
3333
- MacBook Pro (Retina, 15-inch, Late 2013)
34-
- macOS 10.13.5
35-
- node.js v10.6.0
36-
- rustc 1.29.0-nightly (254f8796b 2018-07-13)
34+
- macOS 10.14
35+
- node.js v10.11.0
36+
- rustc 1.31.0-nightly (4bd4e4130 2018-10-25)
3737

3838
***Results:***
3939

@@ -42,6 +42,6 @@ Benchmark
4242
| **AssemblyScript WASM** | **3167** | **2** |
4343
| AssemblyScript ASMJS | 3633 | 21* |
4444
| JavaScript | 2628 | 5* |
45-
| Rust WASM | 3876 | 15 |
45+
| Rust WASM | 3876 | 13 |
4646

4747
___* unminified___

examples/n-body/build/rust.optimized.wasm

100644100755
-2.08 KB
Binary file not shown.

examples/n-body/build/untouched.wat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,9 +1693,9 @@
16931693
(set_local $19
16941694
;;@ assembly/index.ts:129:23
16951695
(block $~lib/math/NativeMath.sqrt|inlined.0 (result f64)
1696-
;;@ ~lib/math.ts:1031:30
1696+
;;@ ~lib/math.ts:1016:30
16971697
(f64.sqrt
1698-
;;@ ~lib/math.ts:1031:29
1698+
;;@ ~lib/math.ts:1016:29
16991699
(get_local $18)
17001700
)
17011701
)
@@ -2157,9 +2157,9 @@
21572157
)
21582158
)
21592159
)
2160-
;;@ ~lib/math.ts:1031:30
2160+
;;@ ~lib/math.ts:1016:30
21612161
(f64.sqrt
2162-
;;@ ~lib/math.ts:1031:29
2162+
;;@ ~lib/math.ts:1016:29
21632163
(get_local $18)
21642164
)
21652165
)

examples/n-body/rust/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use core::intrinsics;
77
use core::panic::PanicInfo;
88

9-
#[panic_implementation]
9+
#[panic_handler]
1010
#[no_mangle]
1111
pub fn panic(_info: &PanicInfo) -> ! {
1212
unsafe { intrinsics::abort() }

0 commit comments

Comments
 (0)