<svg className="container" xmlns="http://www.w3.org/2000/svg" style="position: absolute; width: 0; height: 0" width="0" height="0">
<defs>
<symbol id="umbrella" viewBox="0 0 32 32">
<path d="M27 14h5c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0zM27 14c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0 14c0 1.112-0.895 2-2 2-1.112 0-2-0.896-2-2.001v-1.494c0-0.291 0.224-0.505 0.5-0.505 0.268 0 0.5 0.226 0.5 0.505v1.505c0 0.547 0.444 0.991 1 0.991 0.552 0 1-0.451 1-0.991v-14.009c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-5.415 6.671-9.825 15-9.995v-1.506c0-0.283 0.224-0.499 0.5-0.499 0.268 0 0.5 0.224 0.5 0.499v1.506c8.329 0.17 15 4.58 15 9.995h-5z"></path>
</symbol>
</defs>
</svg>
<script src="https://unpkg.com/react@16/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" crossorigin></script>
<div id="main"></div>
var SVGInline = function() {
return React.createElement(
"svg",
{ className: "office", xmlns: "http://www.w3.org/2000/svg", width: 190, height: 190, viewBox: "0 0 188.5 188.5"},
React.createElement("path", {d: "M27 14h5c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0zM27 14c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0 14c0 1.112-0.895 2-2 2-1.112 0-2-0.896-2-2.001v-1.494c0-0.291 0.224-0.505 0.5-0.505 0.268 0 0.5 0.226 0.5 0.505v1.505c0 0.547 0.444 0.991 1 0.991 0.552 0 1-0.451 1-0.991v-14.009c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-5.415 6.671-9.825 15-9.995v-1.506c0-0.283 0.224-0.499 0.5-0.499 0.268 0 0.5 0.224 0.5 0.499v1.506c8.329 0.17 15 4.58 15 9.995h-5z"}),
);
}
var SVGInlineDangerous = function() {
return React.createElement(
"svg",
{ className: "office", xmlns: "http://www.w3.org/2000/svg", width: 190, height: 190, viewBox: "0 0 188.5 188.5",
dangerouslySetInnerHTML: {
__html: '<path d="M27 14h5c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0zM27 14c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2v0 14c0 1.112-0.895 2-2 2-1.112 0-2-0.896-2-2.001v-1.494c0-0.291 0.224-0.505 0.5-0.505 0.268 0 0.5 0.226 0.5 0.505v1.505c0 0.547 0.444 0.991 1 0.991 0.552 0 1-0.451 1-0.991v-14.009c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-1.105-1.119-2-2.5-2s-2.5 0.895-2.5 2c0-5.415 6.671-9.825 15-9.995v-1.506c0-0.283 0.224-0.499 0.5-0.499 0.268 0 0.5 0.224 0.5 0.499v1.506c8.329 0.17 15 4.58 15 9.995h-5z"></path>'
}
},
);
}
var SVGUse = function() {
return React.createElement(
"svg",
{ className: "office", xmlns: "http://www.w3.org/2000/svg", width: 190, height: 190, viewBox: "0 0 188.5 188.5" },
React.createElement("use", { xlinkHref: '#umbrella' })
);
}
for(i=0;i<500;i++){
ReactDOM.render(React.createElement(SVGInline, null), document.querySelector("#main"));
}
for(i=0;i<500;i++){
ReactDOM.render(React.createElement(SVGUse, null), document.querySelector("#main"));
}
for(i=0;i<500;i++){
ReactDOM.render(React.createElement(SVGInlineDangerous, null), document.querySelector("#main"));
}
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
SVGInline | |
SVGUse | |
SVGInlineDangerous |
Test name | Executions per second |
---|---|
SVGInline | 1284.3 Ops/sec |
SVGUse | 1272.3 Ops/sec |
SVGInlineDangerous | 1258.6 Ops/sec |
It seems like we're dealing with React performance benchmarking data!
After reviewing the provided data, I'll attempt to provide some insights:
Benchmark Definitions
The data includes three benchmark definitions, each rendering a different SVG component: SVGInline
, SVGUse
, and SVGInlineDangerous
. The benchmarks measure the number of executions per second.
Performance Comparison
Comparing the execution rates per second:
SVGInline
: 1284.26 exec/secSVGUse
: 1272.32 exec/secSVGInlineDangerous
: 1258.61 exec/secThe results suggest that SVGInline
performs slightly better than SVGUse
, while SVGInlineDangerous
is the slowest.
Browser and Device Information
The data includes information about the browser, device platform, operating system, and execution rates per second for each test name. The commonalities among these browsers and devices are:
Observations
SVGInline
and SVGUse
.SVGInlineDangerous
is the slowest, which might indicate a potential issue with its implementation or usage.If you'd like to discuss further or have specific questions about these results, feel free to ask!