Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wasm-watermarker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nagayama15
wasm-watermarker
Commits
1b5cd2c4
Commit
1b5cd2c4
authored
Nov 11, 2019
by
nagayama15
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve benchmark
parent
3a605f72
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
3 deletions
+64
-3
.editorconfig
.editorconfig
+4
-0
.gitignore
example/zlib-wasm/.gitignore
+4
-0
Makefile
example/zlib-wasm/Makefile
+44
-0
benchmark.js
example/zlib-wasm/benchmark.js
+12
-3
zlib-funcord-opswap.wasm
example/zlib-wasm/zlib-funcord-opswap.wasm
+0
-0
zlib-funcord.wasm
example/zlib-wasm/zlib-funcord.wasm
+0
-0
zlib-opswap.wasm
example/zlib-wasm/zlib-opswap.wasm
+0
-0
No files found.
.editorconfig
View file @
1b5cd2c4
...
...
@@ -13,3 +13,7 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
indent_size = 4
example/zlib-wasm/.gitignore
0 → 100644
View file @
1b5cd2c4
zlib-1-*.wasm
zlib-2-*.wasm
zlib-3-*.wasm
*.wast
example/zlib-wasm/Makefile
0 → 100644
View file @
1b5cd2c4
SNPI
:=
../../build/src/snpi
AS
:=
../../build/binaryen/src/binaryen-build/bin/wasm-as
W1
:=
60b725f1
W2
:=
0c9c85c7
W3
:=
0d97880d
W4
:=
fe8191b3
SRC
:=
zlib-sample.wasm
TARGETS
:=
\
zlib-1-
${
W1
}
.wasm
\
zlib-2-
${
W1
}
.wasm
\
zlib-3-
${
W1
}
.wasm
\
zlib-1-
${
W2
}
.wasm
\
zlib-2-
${
W2
}
.wasm
\
zlib-3-
${
W2
}
.wasm
\
zlib-1-
${
W3
}
.wasm
\
zlib-2-
${
W3
}
.wasm
\
zlib-3-
${
W3
}
.wasm
\
zlib-1-
${
W4
}
.wasm
\
zlib-2-
${
W4
}
.wasm
\
zlib-3-
${
W4
}
.wasm
all
:
${TARGETS}
node benchmark.js
zlib-1-%.wasm
:
zlib-sample.wasm
${
SNPI
}
$<
funcord
${
@
:zlib-1-%.wasm
=%
}
>
${
@
:%.wasm
=%.wast
}
${
AS
}
${
@
:%.wasm
=%.wast
}
-o
$@
${
RM
}
${
@
:%.wasm
=%.wast
}
zlib-2-%.wasm
:
zlib-sample.wasm
${
SNPI
}
$<
opswap
${
@
:zlib-2-%.wasm
=%
}
>
${
@
:%.wasm
=%.wast
}
${
AS
}
${
@
:%.wasm
=%.wast
}
-o
$@
${
RM
}
${
@
:%.wasm
=%.wast
}
zlib-3-%.wasm
:
zlib-1-%.wasm
${
SNPI
}
$<
opswap
${
@
:zlib-3-%.wasm
=%
}
>
${
@
:%.wasm
=%.wast
}
${
AS
}
${
@
:%.wasm
=%.wast
}
-o
$@
${
RM
}
${
@
:%.wasm
=%.wast
}
clean
:
${
RM
}
zlib-1-
*
.wasm zlib-2-
*
.wasm zlib-3-
*
.wasm
*
.wast
example/zlib-wasm/benchmark.js
View file @
1b5cd2c4
...
...
@@ -7,9 +7,18 @@ const rawData = Crypto.randomBytes(size);
(
async
function
()
{
const
libPaths
=
[
`zlib-sample.wasm`
,
`zlib-funcord.wasm`
,
`zlib-opswap.wasm`
,
`zlib-funcord-opswap.wasm`
,
'zlib-1-0c9c85c7.wasm'
,
'zlib-1-0d97880d.wasm'
,
'zlib-1-60b725f1.wasm'
,
'zlib-1-fe8191b3.wasm'
,
'zlib-2-0c9c85c7.wasm'
,
'zlib-2-0d97880d.wasm'
,
'zlib-2-60b725f1.wasm'
,
'zlib-2-fe8191b3.wasm'
,
'zlib-3-0c9c85c7.wasm'
,
'zlib-3-0d97880d.wasm'
,
'zlib-3-60b725f1.wasm'
,
'zlib-3-fe8191b3.wasm'
,
];
const
libs
=
await
Promise
.
all
(
libPaths
.
map
(
async
path
=>
await
require
(
'./zlib'
).
initialize
(
`
${
__dirname
}
/
${
path
}
`
)));
...
...
example/zlib-wasm/zlib-funcord-opswap.wasm
deleted
100644 → 0
View file @
3a605f72
File deleted
example/zlib-wasm/zlib-funcord.wasm
deleted
100644 → 0
View file @
3a605f72
File deleted
example/zlib-wasm/zlib-opswap.wasm
deleted
100644 → 0
View file @
3a605f72
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment