Title: [151882] branches/dfgFourthTier/Source/_javascript_Core
- Revision
- 151882
- Author
- [email protected]
- Date
- 2013-06-22 18:42:32 -0700 (Sat, 22 Jun 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: branches/dfgFourthTier/Source/_javascript_Core/ChangeLog (151881 => 151882)
--- branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-06-22 23:33:48 UTC (rev 151881)
+++ branches/dfgFourthTier/Source/_javascript_Core/ChangeLog 2013-06-23 01:42:32 UTC (rev 151882)
@@ -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: branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp (151881 => 151882)
--- branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-06-22 23:33:48 UTC (rev 151881)
+++ branches/dfgFourthTier/Source/_javascript_Core/bytecode/CodeBlock.cpp 2013-06-23 01:42:32 UTC (rev 151882)
@@ -1976,7 +1976,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:
@@ -1998,7 +1998,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