Skip to content

Commit

Permalink
Merge branch 'api_improvement'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasso committed Aug 16, 2020
2 parents dfb1cfb + b0f3a60 commit 5cc18c4
Show file tree
Hide file tree
Showing 115 changed files with 95,865 additions and 1,089 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ _book
.nyc_output
.vscode
test/cpp/app.asm.js
TODO.md
package-lock.json
TODO.md
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ jobs:
branches:
only:
- master
if: type = push
after_success: echo "Website online"
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ ES := $(SRCS:$(SRCDIR)/%=$(ESDIR)/%)
LIBS := $(SRCS:$(SRCDIR)/%=$(LIBDIR)/%)
DISTDIR := dist
DISTJS := $(DISTDIR)/js
DISTCPP := $(DISTDIR)/cpp
UMDJS := $(DISTJS)/asm-dom.js
UMDCPP := $(DISTCPP)/asm-dom.js
TESTCPP := test/cpp/app.asm.js
COMPILED := compiled
COMPILEDASMJS := $(COMPILED)/asmjs
Expand All @@ -30,7 +28,6 @@ TREE := \
$(COMPILEDWASM) \
$(DISTDIR) \
$(DISTJS) \
$(DISTCPP) \
$(ESDIR) \
$(LIBDIR) \
$(sort $(patsubst %/,%,$(dir $(ES)))) \
Expand Down Expand Up @@ -107,12 +104,12 @@ lint:
test: $(COMPILEDASMJS)/asm-dom.asm.js $(COMPILEDWASM)/asm-dom.js $(TESTCPP) test_js

test_js:
npx cross-env BABEL_ENV=commonjs nyc --require babel-register --require ./test/setup.js mocha --recursive
npx cross-env BABEL_ENV=commonjs TEST_ENV=node mocha --require babel-register test/cpp/toHTML/toHTML.spec.js
npx cross-env BABEL_ENV=commonjs TEST_ENV=node mocha --require babel-register test/js/toHTML.spec.js
npx cross-env BABEL_ENV=commonjs nyc --require babel-register mocha --recursive

build: compiled/asm-dom.a $(BC) compiled/asm-dom.o $(COMPILEDASMJS)/asm-dom.asm.js $(COMPILEDWASM)/asm-dom.js $(TESTCPP) $(LIBS) $(ES) $(UMDJS) $(UMDCPP)
build: compiled/asm-dom.a $(BC) compiled/asm-dom.o $(COMPILEDASMJS)/asm-dom.asm.js $(COMPILEDWASM)/asm-dom.js $(TESTCPP) $(LIBS) $(ES) $(UMDJS)
npx ncp $(SRCDIR)/cpp $(CPPDIR)
npx ncp $(DISTCPP) $(CPPDIR)
npx ncp $(LIBDIR)/cpp $(CPPDIR)

$(TESTCPP): $(SRCSCPP) $(TEST_FILES)
emcc \
Expand Down Expand Up @@ -153,8 +150,5 @@ $(LIBDIR)/%: $(SRCDIR)/% | $$(@D)
$(UMDJS): $(SRCS) | $$(@D)
npx cross-env BABEL_ENV=commonjs webpack --env.prod src/js/index.js $@

$(UMDCPP): $(SRCS) | $$(@D)
npx cross-env BABEL_ENV=commonjs webpack --env.prod --env.cpp src/cpp/index.js $@

$(TREE): %:
npx mkdirp $@
3 changes: 1 addition & 2 deletions benchmarks/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ es
coverage
_book
.nyc_output
.vscode
package-lock.json
.vscode
12 changes: 6 additions & 6 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ There are 4 tests at the moment:

Here you can find the tests (lower is better) runned on a MacBook Pro (Retina, 13-inch, Late 2013), Processor 2,4 GHz Intel Core i5, Memory 8 GB 1600 MHz DDR3:

### Firefox 59.0.2 (64 bit)
### Firefox 67.0.1 (64 bit)

| library | create nodes | diff equal nodes | diff different nodes | add/remove nodes |
| --- | --- | --- | --- | --- |
| asm-dom | 0.0000 | 2.0000 | 34.0000 | 32.0000 |
| snabbbom | 0.0000 | 12.0000 | 42.0000 | 44.0000 |
| asm-dom | 1.0000 | 2.0000 | 20.0000 | 22.0000 |
| snabbbom | 0.0000 | 9.0000 | 23.0000 | 25.0000 |

### Chrome 66.0.3359.181 (64-bit)
### Chrome 75.0.3770.80 (64-bit)

| library | create nodes | diff equal nodes | diff different nodes | add/remove nodes |
| --- | --- | --- | --- | --- |
| asm-dom | 0.9000 | 3.2000 | 16.4000 | 15.1000 |
| snabbbom | 0.5000 | 4.6000 | 8.7000 | 13.3000 |
| asm-dom | 0.5850 | 2.3950 | 17.7950 | 15.1700 |
| snabbbom | 0.4550 | 3.1100 | 11.4050 | 15.6300 |
Binary file modified benchmarks/compiled/app.bc
Binary file not shown.
Binary file modified benchmarks/compiled/app.o
Binary file not shown.
166 changes: 82 additions & 84 deletions benchmarks/compiled/asmjs/app.asm.js

Large diffs are not rendered by default.

149 changes: 73 additions & 76 deletions benchmarks/compiled/wasm/app.js

Large diffs are not rendered by default.

Binary file modified benchmarks/compiled/wasm/app.wasm
Binary file not shown.
Loading

0 comments on commit 5cc18c4

Please sign in to comment.