Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Native vs snap getPointAtLength
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0
Browser:
Firefox 124
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Native
1447013.4 Ops/sec
Snap
262868.6 Ops/sec
HTML Preparation code:
<script src="https://rawgithub.com/adobe-webplatform/Snap.svg/master/dist/snap.svg.js"></script> <svg id="snap"></svg> <svg height="100" width="100"> <circle id="circle" cx="50" cy="50" r="50" stroke="black" stroke-width="3" fill="none" /> </svg>
Script Preparation code:
var s = Snap('#snap'); s.width=100; s.height=100; var snapCircle = s.circle(50, 50, 50); var circlePath = snapCircle.realPath;
Tests:
Native
document.getElementById("circle").getPointAtLength(Math.random() * 100);
Snap
Snap.path.getPointAtLength(circlePath, Math.random() * 100);