Title: [153243] trunk/Source/_javascript_Core
- Revision
- 153243
- Author
- [email protected]
- Date
- 2013-07-24 21:03:36 -0700 (Wed, 24 Jul 2013)
Log Message
fourthTier: GC's put_by_id transition fixpoint should converge more quickly
https://bugs.webkit.org/show_bug.cgi?id=117912
Reviewed by Mark Hahnenberg.
This was a rookie mistake. The GC does a classic forward data flow fixpoint. These work well so long as you
iterate the program in program order, or at least something close to program order. Because I enjoy reverse
loops ("while (n--) blah"), I ended up iterating in *reverse* of program order which ensured worst-case
pathologies every single time. And unsurprisingly, this slowed down a program, namely pdfjs.
Flipping the loops to iterate forward fixes a 90% regression in Octane/pdfjs and is otherwise neutral.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::propagateTransitions):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (153242 => 153243)
--- trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:03:35 UTC (rev 153242)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-07-25 04:03:36 UTC (rev 153243)
@@ -1,3 +1,20 @@
+2013-06-22 Filip Pizlo <[email protected]>
+
+ fourthTier: GC's put_by_id transition fixpoint should converge more quickly
+ https://bugs.webkit.org/show_bug.cgi?id=117912
+
+ Reviewed by Mark Hahnenberg.
+
+ This was a rookie mistake. The GC does a classic forward data flow fixpoint. These work well so long as you
+ iterate the program in program order, or at least something close to program order. Because I enjoy reverse
+ loops ("while (n--) blah"), I ended up iterating in *reverse* of program order which ensured worst-case
+ pathologies every single time. And unsurprisingly, this slowed down a program, namely pdfjs.
+
+ Flipping the loops to iterate forward fixes a 90% regression in Octane/pdfjs and is otherwise neutral.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::propagateTransitions):
+
2013-06-21 Filip Pizlo <[email protected]>
fourthTier: DFG should CSE MakeRope
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (153242 => 153243)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-07-25 04:03:35 UTC (rev 153242)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-07-25 04:03:36 UTC (rev 153243)
@@ -1972,7 +1972,7 @@
Interpreter* interpreter = m_vm->interpreter;
if (jitType() == JITCode::InterpreterThunk) {
const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
- for (size_t i = propertyAccessInstructions.size(); i--;) {
+ for (size_t i = 0; i < propertyAccessInstructions.size(); ++i) {
Instruction* instruction = &instructions()[propertyAccessInstructions[i]];
switch (interpreter->getOpcodeID(instruction[0].u.opcode)) {
case op_put_by_id_transition_direct:
@@ -1994,7 +1994,7 @@
#if ENABLE(JIT)
if (JITCode::isJIT(jitType())) {
- for (unsigned i = m_structureStubInfos.size(); i--;) {
+ for (unsigned i = 0; i < m_structureStubInfos.size(); ++i) {
StructureStubInfo& stubInfo = m_structureStubInfos[i];
switch (stubInfo.accessType) {
case access_put_by_id_transition_normal:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes