-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
88 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
import { bs } from "../custom/bs"; | ||
import { serializeBool, serializeBool_BS } from "../serialize/bool" | ||
import { serialize_simd, serializeString, serializeString_BS } from "../serialize/string"; | ||
import { serialize_simd_v1, serializeString, serializeString_BS } from "../serialize/string"; | ||
|
||
const out = memory.data(65536); | ||
|
||
bench("Serialize String", () => { | ||
blackbox<string>(serializeString("hello \"world abc")); | ||
}); | ||
bench("UTF-16 to UTF-8", () => { | ||
blackbox<ArrayBuffer>(String.UTF8.encode(blackbox<string>("hello world"))) | ||
}) | ||
// bench("Serialize String Native", () => { | ||
// blackbox<string>(serializeString("hello \"world abc")); | ||
// }); | ||
|
||
bench("Serialize String BS", () => { | ||
serializeString_BS("hello \"world abc"); | ||
bs.reset(); | ||
}); | ||
// bench("Serialize String Sink", () => { | ||
// serializeString_BS("hello \"world abc"); | ||
// bs.reset(); | ||
// }); | ||
|
||
bench("Serialize String SIMD", () => { | ||
serialize_simd("hello \"world abc", out); | ||
}) | ||
// bench("Serialize String SIMD", () => { | ||
// serialize_simd_v1("hello \"world abc", out); | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.