jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
var cCharDelimiter = String.fromCharCode(5)
function Vertex(sheetId, cellId, wb){
this.sheetId = sheetId;
this.cellId = cellId;
this.bbox = {c1:0,c2:0,r1:0,r2:0};
this.isArea = Math.random() < 0.5 ? true : false;
this.valid = true;
this.nodeId = getVertexId(this.sheetId, this.cellId);
this.wb = wb;
this.cell = null;
//вершина которую мы прошли и поставили в очередь обхода
this.isBlack = false;
//вершина которую мы прошли, но не поставили в очередь обхода. нужно для определения петель в графе.
this.isGray = false;
//если вершина входит в цикличный путь, то она помечается плохой и запоминается в списке плохих вершин.
this.isBad = false;
//masterEdges содержит ячейки, от которых зависит текущая ячейка
this.masterEdges = {};
//slaveEdges содержит ячейки, которые зависят от данной ячейки
this.slaveEdges = {};
this.refCount = 0;
}
Vertex.prototype = {
constructor: Vertex,
getBBox : function()
{
return this.bbox;
},
setFormula : function(sFormula, bAddToHistory, bAddNeedRecalc)
{ },
setRefError : function(wsId, cellId)
{ },
moveInner: function (bboxTo)
{ },
moveOuter: function (from, to, oFormulas)
{ },
//добавляем ведущую ячейку.
addMasterEdge : function(node){
this.masterEdges[node.nodeId] = node;
this.refCount ++;
},
//добавляем зависимую(ведомую) ячейку.
addSlaveEdge : function(node){
this.slaveEdges[node.nodeId] = node;
this.refCount ++;
}
}
/*function getVertexId(sheetId, cellId){
return sheetId + cCharDelimiter + cellId;
}*/
function getVertexId(sheetId, cellId){
return "_"+new Date().getTime()+31415926;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
o1 |
| ready |
o2 |
| ready |
o3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.