Changeset 185780 in webkit
- Timestamp:
- Jun 19, 2015, 4:49:38 PM (11 years ago)
- Location:
- trunk/PerformanceTests
- Files:
-
- 19 added
- 1 deleted
- 5 edited
-
ChangeLog (modified) (1 diff)
-
JetStream/CDjsSetup.js (added)
-
JetStream/Octane2Setup.js (modified) (2 diffs)
-
JetStream/Reference.js (modified) (3 diffs)
-
JetStream/cdjs (added)
-
JetStream/cdjs/benchmark.js (added)
-
JetStream/cdjs/call_sign.js (added)
-
JetStream/cdjs/collision.js (added)
-
JetStream/cdjs/collision_detector.js (added)
-
JetStream/cdjs/constants.js (added)
-
JetStream/cdjs/main.html (added)
-
JetStream/cdjs/main.js (added)
-
JetStream/cdjs/motion.js (added)
-
JetStream/cdjs/motion_test.js (added)
-
JetStream/cdjs/red_black_tree.js (added)
-
JetStream/cdjs/red_black_tree_test.js (added)
-
JetStream/cdjs/reduce_collision_set.js (added)
-
JetStream/cdjs/reduce_collision_set_test.js (added)
-
JetStream/cdjs/simulator.js (added)
-
JetStream/cdjs/util.js (added)
-
JetStream/cdjs/vector_2d.js (added)
-
JetStream/cdjs/vector_3d.js (added)
-
JetStream/create.rb (modified) (3 diffs)
-
JetStream/index-TEMPLATE.html (modified) (1 diff)
-
JetStream/sunspider/cordic.js (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PerformanceTests/ChangeLog
r185654 r185780 1 2015-06-19 Filip Pizlo <fpizlo@apple.com> 2 3 JetStream should include a JavaScript version of the CDx real-time benchmark 4 https://bugs.webkit.org/show_bug.cgi?id=146156 5 6 Reviewed by Geoffrey Garen. 7 8 This adds a JavaScript port of the CDx real-time benchmark to JetStream, and retires 9 the cordic test because it was previously the smallest and probably least interesting. 10 11 The new test, "cdjs", is mostly a faithful rewrite of the Java code into JavaScript. 12 I got the Java code from https://www.cs.purdue.edu/sss/projects/cdx/. 13 14 There are some differences: 15 16 - It uses RedBlackTree's for all sets and maps rather than hashtables. This is clearly 17 more in the spirit of real-time than the CDx benchmark. FWIW, CDx used to use trees 18 and I don't know why that changed in the latest version. 19 20 - CDjs doesn't attempt to avoid memory allocations, unlike the real-time Java version. 21 I wrote the code that I wanted to write for aesthetics, rather than the code that I 22 would have written if I tried to write the fastest code possible. Again, I believe 23 that this is in the spirit of CDj - it's meant to test what would happen if you wrote 24 real-timey stuff in a high level language and actually took advantage of that 25 language to be more productive. 26 27 The test score reflects the average latency of the worst 10 samples out of 200 samples. 28 The simulation uses 1000 aircraft, flying along paths that result in some detected 29 collisions every once in a while. The benchmark validates its results by checking the 30 total number of collisions detected. 31 32 Apart from the integration into the JetStream harness, the CDjs directory contains a 33 fully self-contained benchmark that could be run either in the jsc shell or in browser. 34 35 This new code uses the same 3-clause BSD license as the Purdue code, and gives 36 attribution to Purdue in almost all files. I believe that is appropriate since I wrote 37 most of the JS files by looking at the Purdue Java code and trascribing to JavaScript. 38 In some cases, I even copy-pasted the Java code, like the complicated math for 39 four-dimensional intersections and voxel hashing. 40 41 * JetStream/CDjsSetup.js: Added. 42 * JetStream/Octane2Setup.js: 43 * JetStream/Reference.js: 44 * JetStream/cdjs: Added. 45 * JetStream/cdjs/benchmark.js: Added. 46 (benchmark): 47 * JetStream/cdjs/call_sign.js: Added. 48 (CallSign): 49 (CallSign.prototype.compareTo): 50 (CallSign.prototype.toString): 51 * JetStream/cdjs/collision.js: Added. 52 (Collision): 53 (Collision.prototype.toString): 54 * JetStream/cdjs/collision_detector.js: Added. 55 (CollisionDetector): 56 (CollisionDetector.prototype.handleNewFrame.get for): 57 (CollisionDetector.prototype.handleNewFrame): 58 * JetStream/cdjs/constants.js: Added. 59 * JetStream/cdjs/main.html: Added. 60 * JetStream/cdjs/main.js: Added. 61 * JetStream/cdjs/motion.js: Added. 62 (Motion): 63 (Motion.prototype.toString): 64 (Motion.prototype.delta): 65 (Motion.prototype.findIntersection): 66 * JetStream/cdjs/motion_test.js: Added. 67 (checkDoesIntersect): 68 (checkDoesNotIntersect): 69 (makeMotion): 70 * JetStream/cdjs/red_black_tree.js: Added. 71 (RedBlackTree): 72 (RedBlackTree.): 73 * JetStream/cdjs/red_black_tree_test.js: Added. 74 (test): 75 (test.): 76 * JetStream/cdjs/reduce_collision_set.js: Added. 77 (drawMotionOnVoxelMap): 78 (drawMotionOnVoxelMap.): 79 (.get reduceCollisionSet): 80 * JetStream/cdjs/reduce_collision_set_test.js: Added. 81 (makeMotion): 82 (keys): 83 (test): 84 * JetStream/cdjs/simulator.js: Added. 85 (Simulator): 86 (Simulator.prototype.simulate): 87 * JetStream/cdjs/util.js: Added. 88 (compareNumbers): 89 (averageAbovePercentile): 90 (currentTime): 91 (else.currentTime): 92 * JetStream/cdjs/vector_2d.js: Added. 93 (Vector2D): 94 (Vector2D.prototype.plus): 95 (Vector2D.prototype.minus): 96 (Vector2D.prototype.toString): 97 (Vector2D.prototype.compareTo): 98 * JetStream/cdjs/vector_3d.js: Added. 99 (Vector3D): 100 (Vector3D.prototype.plus): 101 (Vector3D.prototype.minus): 102 (Vector3D.prototype.dot): 103 (Vector3D.prototype.squaredMagnitude): 104 (Vector3D.prototype.magnitude): 105 (Vector3D.prototype.times): 106 (Vector3D.prototype.as2D): 107 (Vector3D.prototype.toString): 108 * JetStream/create.rb: 109 * JetStream/index-TEMPLATE.html: 110 * JetStream/sunspider/cordic.js: Removed. 111 1 112 2015-06-17 Javier Fernandez <jfernandez@igalia.com> 2 113 -
trunk/PerformanceTests/JetStream/Octane2Setup.js
r183091 r185780 1 // Copyright (C) 2014 Apple Inc. All rights reserved.1 // Copyright (C) 2014, 2015 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 50 50 myBenchmarks.push({ 51 51 name: suite.name + "-latency", 52 prefix: "σ =",52 unit: "ms", 53 53 category: "Latency" 54 54 }); -
trunk/PerformanceTests/JetStream/Reference.js
r185425 r185780 1 // Copyright (C) 2014 Apple Inc. All rights reserved.1 // Copyright (C) 2014, 2015 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 26 26 "3d-raytrace": 8.05, 27 27 "base64": 4.2, 28 "cordic": 3,29 28 "crypto-aes": 6.6, 30 29 "crypto-md5": 3, … … 66 65 "typescript": 1149.9999999999993, 67 66 "lua": 29858, 67 "cdjs": 14, 68 68 "geomean": 31.556451704472156, 69 69 }); -
trunk/PerformanceTests/JetStream/create.rb
r185425 r185780 27 27 require "shellwords" 28 28 29 VERSION = "1.1-alpha 1"29 VERSION = "1.1-alpha2" 30 30 DIRECTORY_NAME = "JetStream-#{VERSION}" 31 31 … … 35 35 raise unless system("mkdir -p #{DIRECTORY_NAME}/sources") 36 36 raise unless system("cp sunspider/*.js #{DIRECTORY_NAME}/sunspider") 37 raise unless system("cp -r JetStream.css JetStreamDriver.js LLVM-test-suite-LICENSE.txt simple Octane2 Octane2Setup.js SimpleSetup.js SunSpiderSetup.js Octane OctaneSetup.js Reference.js TestingSetup.js JetStream-Logo.png JetStream-Logo@2x.png Swoosh.png Swoosh@2x.png " + DIRECTORY_NAME)37 raise unless system("cp -r JetStream.css JetStreamDriver.js LLVM-test-suite-LICENSE.txt simple Octane2 Octane2Setup.js SimpleSetup.js SunSpiderSetup.js Octane OctaneSetup.js CDjsSetup.js cdjs Reference.js TestingSetup.js JetStream-Logo.png JetStream-Logo@2x.png Swoosh.png Swoosh@2x.png " + DIRECTORY_NAME) 38 38 39 39 def detemplatize(basename) … … 117 117 transferSource("zlib", "Octane2/zlib.js", "Octane2/zlib-data.js") 118 118 transferSource("typescript", "Octane2/typescript.js", "Octane2/typescript-compiler.js", "Octane2/typescript-input.js") 119 transferSource("cdjs", "cdjs/constants.js", "cdjs/util.js", "cdjs/red_black_tree.js", "cdjs/call_sign.js", "cdjs/vector_2d.js", "cdjs/vector_3d.js", "cdjs/motion.js", "cdjs/reduce_collision_set.js", "cdjs/simulator.js", "cdjs/collision.js", "cdjs/collision_detector.js", "cdjs/benchmark.js") 119 120 120 121 puts "You can now run JetStream by navigating to file://" + (Pathname.new(DIRECTORY_NAME) + "index.html").realpath.to_s -
trunk/PerformanceTests/JetStream/index-TEMPLATE.html
r183091 r185780 49 49 <script src="OctaneSetup.js"></script> 50 50 <script src="Octane2Setup.js"></script> 51 <script src="CDjsSetup.js"></script> 51 52 <script src="Reference.js"></script> 52 53 </head>
Note:
See TracChangeset
for help on using the changeset viewer.