Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remove WebAssembly stuff because it is not much faster than pureJs #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
gfx merged 1 commit into master from remove_wasm
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
"@typescript-eslint/no-var-requires": "off", // enforces `import x = require("x")`, which is TypeScript-specific
"@typescript-eslint/prefer-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-ignore": "off",

"prettier/prettier": "warn",
},
Expand Down
40 changes: 19 additions & 21 deletions README.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -42,30 +42,30 @@ deepStrictEqual(decode(encoded), object);
- [Table of Contents](#table-of-contents)
- [Install](#install)
- [API](#api)
- [`encode(data: unknown, options?: EncodeOptions): Uint8Array`](#encodedata-unknown-options-encodeoptions-uint8array)
- [`EncodeOptions`](#encodeoptions)
- [`decode(buffer: ArrayLike<number> | ArrayBuffer, options?: DecodeOptions): unknown`](#decodebuffer-arraylikenumber--arraybuffer-options-decodeoptions-unknown)
- [`DecodeOptions`](#decodeoptions)
- [`decodeAsync(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): Promise<unknown>`](#decodeasyncstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-promiseunknown)
- [`decodeArrayStream(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`](#decodearraystreamstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-asynciterableunknown)
- [`decodeStream(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`](#decodestreamstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-asynciterableunknown)
- [Extension Types](#extension-types)
- [Handling BigInt with ExtensionCodec](#handling-bigint-with-extensioncodec)
- [The temporal module as timestamp extensions](#the-temporal-module-as-timestamp-extensions)
- [`encode(data: unknown, options?: EncodeOptions): Uint8Array`](#encodedata-unknown-options-encodeoptions-uint8array)
- [`EncodeOptions`](#encodeoptions)
- [`decode(buffer: ArrayLike<number> | ArrayBuffer, options?: DecodeOptions): unknown`](#decodebuffer-arraylikenumber--arraybuffer-options-decodeoptions-unknown)
- [`DecodeOptions`](#decodeoptions)
- [`decodeAsync(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): Promise<unknown>`](#decodeasyncstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-promiseunknown)
- [`decodeArrayStream(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`](#decodearraystreamstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-asynciterableunknown)
- [`decodeStream(stream: AsyncIterable<ArrayLike<number>> | ReadableStream<ArrayLike<number>>, options?: DecodeAsyncOptions): AsyncIterable<unknown>`](#decodestreamstream-asynciterablearraylikenumber--readablestreamarraylikenumber-options-decodeasyncoptions-asynciterableunknown)
- [Extension Types](#extension-types)
- [Handling BigInt with ExtensionCodec](#handling-bigint-with-extensioncodec)
- [The temporal module as timestamp extensions](#the-temporal-module-as-timestamp-extensions)
- [MessagePack Specification](#messagepack-specification)
- [MessagePack Mapping Table](#messagepack-mapping-table)
- [MessagePack Mapping Table](#messagepack-mapping-table)
- [Prerequsites](#prerequsites)
- [ECMA-262](#ecma-262)
- [NodeJS](#nodejs)
- [ECMA-262](#ecma-262)
- [NodeJS](#nodejs)
- [Benchmark](#benchmark)
- [Distribution](#distribution)
- [NPM / npmjs.com](#npm--npmjscom)
- [CDN / unpkg.com](#cdn--unpkgcom)
- [NPM / npmjs.com](#npm--npmjscom)
- [CDN / unpkg.com](#cdn--unpkgcom)
- [Maintenance](#maintenance)
- [Testing](#testing)
- [Continuous Integration](#continuous-integration)
- [Release Engineering](#release-engineering)
- [Updating Dependencies](#updating-dependencies)
- [Testing](#testing)
- [Continuous Integration](#continuous-integration)
- [Release Engineering](#release-engineering)
- [Updating Dependencies](#updating-dependencies)
- [Big Thanks](#big-thanks)
- [License](#license)

Expand Down Expand Up @@ -449,8 +449,6 @@ This library uses Travis CI.

test matrix:

* WebAssembly availability
* `WASM=force` / `WASM=never`
* TypeScript targets
* `target=es2019` / `target=es5`
* JavaScript engines
Expand Down
81 changes: 0 additions & 81 deletions assembly/be.ts
View file Open in desktop

This file was deleted.

3 changes: 0 additions & 3 deletions assembly/index.ts
View file Open in desktop

This file was deleted.

9 changes: 0 additions & 9 deletions assembly/memory.ts
View file Open in desktop

This file was deleted.

6 changes: 0 additions & 6 deletions assembly/tsconfig.json
View file Open in desktop

This file was deleted.

44 changes: 0 additions & 44 deletions assembly/utf8CountUint16Array.ts
View file Open in desktop

This file was deleted.

46 changes: 0 additions & 46 deletions assembly/utf8DecodeToUint16Array.ts
View file Open in desktop

This file was deleted.

80 changes: 0 additions & 80 deletions assembly/utf8EncodeUint16Array.ts
View file Open in desktop

This file was deleted.

7 changes: 0 additions & 7 deletions benchmark/decode-string.ts
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable no-console */
import { utf8EncodeJs, utf8Count, utf8DecodeJs, utf8DecodeTD } from "../src/utils/utf8";
import { utf8DecodeWasm } from "../src/wasmFunctions";

// @ts-ignore
import Benchmark from "benchmark";
Expand All @@ -25,12 +24,6 @@ for (const baseStr of ["A", "あ", "🌏"]) {
}
});

suite.add("utf8DecodeWasm", () => {
if (utf8DecodeWasm(bytes, 0, byteLength) !== str) {
throw new Error("wrong result!");
}
});

suite.add("TextDecoder", () => {
if (utf8DecodeTD(bytes, 0, byteLength) !== str) {
throw new Error("wrong result!");
Expand Down
3 changes: 0 additions & 3 deletions benchmark/string.ts
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* eslint-disable no-console */
import { encode, decode } from "../src";
import { WASM_AVAILABLE } from "../src/wasmFunctions";

console.log(`WASM_AVAILABLE=${WASM_AVAILABLE}`);

const ascii = "A".repeat(40000);
const emoji = "🌏".repeat(20000);
Expand Down
6 changes: 1 addition & 5 deletions karma.conf.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,7 @@ export default function configure(config: any) {
},
],
},
plugins: [
new webpack.DefinePlugin({
"process.env.MSGPACK_WASM": JSON.stringify(process.env.MSGPACK_WASM),
}),
],
plugins: [],
optimization: {
minimize: false,
},
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /