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
<script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script><script src="http://www.gobec.cz/fileadmin/geojson.js"></script>
<div id="mapCanvas" style="width:470px; height:470px; float:right"></div>
<div id="mapSvg" style="width:470px; height:470px; float:right"></div>
<script type="text/javascript">
var layerCANVAS = new OpenLayers.Layer.Vector("vec", { isBaseLayer: true, renderers: ["Canvas", "SVG", "VML"] });
layerCANVAS.addFeatures(new OpenLayers.Format.GeoJSON().read(data["geojson"]));
var layerSVG = new OpenLayers.Layer.Vector("vec", { isBaseLayer: true, renderers: ["SVG", "Canvas", "VML"] });
layerSVG.addFeatures(new OpenLayers.Format.GeoJSON().read(data["geojson"]));
var selectCANVAS = new OpenLayers.Control.SelectFeature({
hover: true,
highlightOnly: true,
renderIntent: "temporary",
autoActivate: true
});
var selectSVG = new OpenLayers.Control.SelectFeature({
hover: true,
highlightOnly: true,
renderIntent: "temporary",
autoActivate: true
});
var mapCANVAS = new OpenLayers.Map("mapCanvas", {
maxExtent: layerCANVAS.getDataExtent(),
layers: [layerCANVAS],
controls: [selectCANVAS]
});
var mapSVG = new OpenLayers.Map("mapSvg", {
maxExtent: layerSVG.getDataExtent(),
layers: [layerSVG],
controls: [selectSVG]
});
mapCANVAS.zoomToExtent(layerCANVAS.getDataExtent());
mapSVG.zoomToExtent(layerSVG.getDataExtent());
mapCANVAS.zoomIn();
mapSVG.zoomIn();
function redrawCANVAS() {
layerCANVAS.redraw();
}
function selectFeatureCANVAS() {
selectCANVAS.highlight(layerCANVAS.features[0]);
selectCANVAS.unhighlight(layerCANVAS.features[0]);
}
function redrawSVG() {
layerSVG.redraw();
}
function selectFeatureSVG() {
selectSVG.highlight(layerSVG.features[0]);
selectSVG.unhighlight(layerSVG.features[0]);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
redraw canvas |
| ready |
select canvas |
| ready |
redraw svg |
| ready |
select svg |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.