mohayonao / web-audio-engine

Pure JS implementation of the Web Audio API
243 stars 32 forks source link

improve context performance #21

Closed mohayonao closed 8 years ago

mohayonao commented 8 years ago

before

OfflineAudioContext-noop.js
src x 234 ops/sec ±3.10% (75 runs sampled)
lib x 243 ops/sec ±2.83% (63 runs sampled)
bld x 289 ops/sec ±3.08% (75 runs sampled)
Fastest is bld

OfflineAudioContext-sine.js
src x 77.33 ops/sec ±3.74% (71 runs sampled)
lib x 115 ops/sec ±3.09% (73 runs sampled)
bld x 110 ops/sec ±2.96% (71 runs sampled)
Fastest is lib

after

OfflineAudioContext-noop.js
src x 2,155 ops/sec ±2.59% (66 runs sampled)
lib x 2,321 ops/sec ±2.55% (63 runs sampled)
bld x 2,262 ops/sec ±2.34% (62 runs sampled)
Fastest is lib,bld

OfflineAudioContext-sine.js
src x 349 ops/sec ±2.20% (77 runs sampled)
lib x 527 ops/sec ±2.26% (74 runs sampled)
bld x 521 ops/sec ±2.75% (75 runs sampled)
Fastest is lib,bld