Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Unified Diff: third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-array.html

Issue 2821493002: bindings: Add performance test for JS->WebIDL sequence conversions. (Closed)
Patch Set: Push empty strings into the array Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-array.html
diff --git a/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-array.html b/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-array.html
new file mode 100644
index 0000000000000000000000000000000000000000..d0aa16c871c60a0c263223283b4b7a97c6aa5c9b
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-array.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/runner.js"></script>
+<script>
+let dataArray = [];
+for (let i = 0; i < 100000; i++) {
+ // We are interested in the conversion of JS arrays to C++ sequences, not in
+ // the JS string to C++ string conversion, so just push empty strings into
+ // the array.
+ dataArray.push('');
+}
+
+PerfTestRunner.measureRunsPerSecond({
+ description: "This benchmark measures the overhead of converting JavaScript objects into WebIDL sequences (fast path for arrays)",
+ run: function() {
+ new Blob(dataArray);
+ }});
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698