Build the module, then run it with a Release ARM64 jsc.
wat2wasm bitmask.wat -o bitmask.wasm
Build the module, then run it with a Release ARM64 jsc.
wat2wasm bitmask.wat -o bitmask.wasm
| // Portable WebAssembly.Memory.grow microbench for jsc and node/V8. | |
| // | |
| // jsc (BoundsChecking): | |
| // jsc --useWasmFastMemory=false --useExecutableAllocationFuzz=false wasm-memory-grow-bench.js | |
| // jsc (default / Signaling when available): | |
| // jsc --useExecutableAllocationFuzz=false wasm-memory-grow-bench.js | |
| // node / V8: | |
| // node wasm-memory-grow-bench.js | |
| function nowMs() { |
You can install Node Nightlies/RCs via nvm using NVM_NODEJS_ORG_MIRROR environment variable.
Install latest Node RC
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/rc/ nvm i nodeInstall latest Node.js Nightly
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm i node| Now using node v4.7.2 (npm v2.15.11) | |
| // v8 4.5.103.43 (Node.js 4.7.2) | |
| forVar_______: 2ms | |
| forLet_______: 13ms | |
| forOfVar_____: 66ms | |
| forOfLetConst: 64ms | |
| forEachVar___: 15ms | |
| forEachLet___: 21ms |
| (module | |
| (type $FUNCSIG$iii (func (param i32 i32) (result i32))) | |
| (type $FUNCSIG$vi (func (param i32))) | |
| (type $FUNCSIG$ji (func (param i32) (result i64))) | |
| (type $FUNCSIG$viii (func (param i32 i32 i32))) | |
| (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) | |
| (type $FUNCSIG$i (func (result i32))) | |
| (type $FUNCSIG$v (func)) | |
| (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) | |
| (type $FUNCSIG$vii (func (param i32 i32))) |
| fn main() { | |
| println!("Hello, Emscripten!"); | |
| } |
| /* | |
| * Copyright 2015 WebAssembly Community Group participants | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| Module["asm"] = (function(global, env, buffer) { | |
| 'almost asm'; | |
| var HEAP8 = new global.Int8Array(buffer); | |
| var HEAP16 = new global.Int16Array(buffer); | |
| var HEAP32 = new global.Int32Array(buffer); | |
| var HEAPU8 = new global.Uint8Array(buffer); | |
| var HEAPU16 = new global.Uint16Array(buffer); | |
| var HEAPU32 = new global.Uint32Array(buffer); |
| function nonCoercible(val) { | |
| if (val == null) { | |
| throw TypeError('nonCoercible shouldn\'t be called with null or undefined'); | |
| } | |
| const res = Object(val); | |
| res[Symbol.toPrimitive] = () => { | |
| throw TypeError('Trying to coerce non-coercible object'); | |
| } | |
| return res; | |
| }; |
The download/install takes a while so start it first. When it finishes downloading you will still need to run it to complete installation.
Really the nicest choice for a terminal on OSX right now.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"