test2.js remove commented-out bloat
This commit is contained in:
parent
b4bf1f9a9f
commit
ef2688150f
1 changed files with 0 additions and 56 deletions
56
test2.js
56
test2.js
|
@ -22,8 +22,6 @@ window.addEventListener("load",async ()=> {
|
||||||
textarea.style.height="100vh";
|
textarea.style.height="100vh";
|
||||||
document.body.appendChild(textarea);
|
document.body.appendChild(textarea);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for(var i=0; i<=23; i++)
|
for(var i=0; i<=23; i++)
|
||||||
{
|
{
|
||||||
let bytes = 1 << i;
|
let bytes = 1 << i;
|
||||||
|
@ -36,62 +34,8 @@ window.addEventListener("load",async ()=> {
|
||||||
"===> "+zerozipped.size+" compression ("+(((zerozipped.size/bytes*10000)|0)/100)+"%)\n"+
|
"===> "+zerozipped.size+" compression ("+(((zerozipped.size/bytes*10000)|0)/100)+"%)\n"+
|
||||||
Array.from(new Uint8Array(await zipped.slice(0,32).arrayBuffer())).map((e)=>{ return ("0"+e.toString(16)).slice(-2);}).join(" ")+"\n";
|
Array.from(new Uint8Array(await zipped.slice(0,32).arrayBuffer())).map((e)=>{ return ("0"+e.toString(16)).slice(-2);}).join(" ")+"\n";
|
||||||
Array.from(new Uint8Array(await zerozipped.slice(0,32).arrayBuffer())).map((e)=>{ return ("0"+e.toString(16)).slice(-2);}).join(" ")+"\n";
|
Array.from(new Uint8Array(await zerozipped.slice(0,32).arrayBuffer())).map((e)=>{ return ("0"+e.toString(16)).slice(-2);}).join(" ")+"\n";
|
||||||
|
|
||||||
// var gzippeduint = new Uint8Array(await gzipped.arrayBuffer());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// var div = document.createElement("div");
|
|
||||||
// var acount=0;
|
|
||||||
// var bcount=0;
|
|
||||||
// var end;
|
|
||||||
// var secs=10;
|
|
||||||
// var done=false
|
|
||||||
// document.body.appendChild(div);
|
|
||||||
// (function info(){
|
|
||||||
// div.innerHTML="end in "+(end - Date.now())
|
|
||||||
// +"<br>acount="+acount
|
|
||||||
// +"<br>bcount="+bcount;
|
|
||||||
// if(!done)
|
|
||||||
// setTimeout(info,100);
|
|
||||||
// })();
|
|
||||||
//
|
|
||||||
// function wait(ms=100){
|
|
||||||
// return new Promise((resolve)=>{
|
|
||||||
// setTimeout(resolve,ms);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// await (()=>{return new Promise((resolve)=>{console.log('start promise');setTimeout(resolve,100);});})();
|
|
||||||
// var a = (new Array(20000000)).join(".");
|
|
||||||
// const enc = new TextEncoder();
|
|
||||||
// var ab;
|
|
||||||
//
|
|
||||||
// console.log("start test a");
|
|
||||||
// end = Date.now() + secs * 1000;
|
|
||||||
// while(Date.now()<end){
|
|
||||||
// acount++;
|
|
||||||
// for(let i=0; i<10; i++)
|
|
||||||
// {
|
|
||||||
// ab = enc.encode(a);
|
|
||||||
// await wait(0);
|
|
||||||
// var first = new Uint8Array(ab)[0];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// console.log("ended test a",acount);
|
|
||||||
//
|
|
||||||
// console.log("start test b");
|
|
||||||
// end = Date.now() + secs * 1000;
|
|
||||||
// while(Date.now()<end){
|
|
||||||
// bcount++;
|
|
||||||
// for(let i=0; i<10; i++)
|
|
||||||
// {
|
|
||||||
// //ab = await new Blob([a]).arrayBuffer();
|
|
||||||
// new Blob([a]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// console.log("ended test b",bcount);
|
|
||||||
// done=true;
|
|
||||||
},false);
|
},false);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue