Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(634)

Issue 217052: Optimize IMPORT_NAME (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 2 months ago by Collin Winter
Modified:
14 years, 1 month ago
CC:
unladen-swallow_googlegroups.com
Visibility:
Public.

Description

### django ### Min: 0.823356 -> 0.679505: 1.2117x faster Avg: 0.826658 -> 0.684047: 1.2085x faster Significant (t=138.673808) Stddev: 0.00710 -> 0.00744: 1.0472x larger Timeline: http://tinyurl.com/ybzne8a Other benchmark changes are insignificant. All tests pass. Committed as http://code.google.com/p/unladen-swallow/source/detail?r=1123.

Patch Set 1 #

Patch Set 2 : Finish llvm_notes.txt changes #

Total comments: 6

Patch Set 3 : Address rnk's comments #

Patch Set 4 : Update to r1120 #

Total comments: 6

Patch Set 5 : Address jyasskin's comments #

Patch Set 6 : Fix over-aggressive S&R #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -28 lines) Patch
M Include/code.h View 1 chunk +1 line, -0 lines 0 comments Download
M Lib/test/test_llvm.py View 1 2 3 3 chunks +143 lines, -2 lines 0 comments Download
M Python/llvm_compile.cc View 1 chunk +0 lines, -11 lines 0 comments Download
M Python/llvm_fbuilder.h View 1 2 3 4 3 chunks +10 lines, -3 lines 0 comments Download
M Python/llvm_fbuilder.cc View 1 2 3 4 5 7 chunks +84 lines, -12 lines 0 comments Download
M Python/llvm_notes.txt View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download

Messages

Total messages: 6
Collin Winter
PTAL
14 years, 2 months ago (2010-02-19 20:34:26 UTC) #1
Reid Kleckner
http://codereview.appspot.com/217052/diff/14/17 File Python/llvm_compile.cc (left): http://codereview.appspot.com/217052/diff/14/17#oldcode193 Python/llvm_compile.cc:193: // being watching, neither is being watched. Was this ...
14 years, 2 months ago (2010-02-19 23:34:45 UTC) #2
Collin Winter
PTAL http://codereview.appspot.com/217052/diff/14/17 File Python/llvm_compile.cc (left): http://codereview.appspot.com/217052/diff/14/17#oldcode193 Python/llvm_compile.cc:193: // being watching, neither is being watched. On ...
14 years, 1 month ago (2010-02-22 21:35:22 UTC) #3
Collin Winter
Updated to r1120 baseline. Any other comments?
14 years, 1 month ago (2010-03-03 02:21:09 UTC) #4
Jeffrey Yasskin
LGTM, aside from the comments below. http://codereview.appspot.com/217052/diff/3001/4004 File Python/llvm_fbuilder.cc (right): http://codereview.appspot.com/217052/diff/3001/4004#newcode232 Python/llvm_fbuilder.cc:232: #define IMPORT_NAME_STATS(field) import_name_stats->field++ ...
14 years, 1 month ago (2010-03-08 22:32:39 UTC) #5
Collin Winter
14 years, 1 month ago (2010-03-09 00:18:11 UTC) #6
Committing, thanks.

http://codereview.appspot.com/217052/diff/3001/4004
File Python/llvm_fbuilder.cc (right):

http://codereview.appspot.com/217052/diff/3001/4004#newcode232
Python/llvm_fbuilder.cc:232: #define IMPORT_NAME_STATS(field)
import_name_stats->field++
On 2010/03/08 22:32:40, Jeffrey Yasskin wrote:
> The name of this macro doesn't mention that it's incrementing something. :(

Done.

http://codereview.appspot.com/217052/diff/3001/4004#newcode2568
Python/llvm_fbuilder.cc:2568: // We should already be watching this dict, thanks
to the LOAD_GLOBAL
On 2010/03/08 22:32:40, Jeffrey Yasskin wrote:
> Is this going to be fragile as we add more watching? Or is there some logical
> reason that WATCHING_BUILTINS always comes along with WATCHING_SYS_MODULES?

Commented better.

http://codereview.appspot.com/217052/diff/3001/4005
File Python/llvm_fbuilder.h (right):

http://codereview.appspot.com/217052/diff/3001/4005#newcode718
Python/llvm_fbuilder.h:718: llvm::SparseBitVector<NUM_WATCHING_REASONS>
uses_watched_dicts_;
On 2010/03/08 22:32:40, Jeffrey Yasskin wrote:
> I think you actually want a std::bitset
> (http://www.sgi.com/tech/stl/bitset.html). SparseBitVector has lots of
overhead
> for storing only 3 bits and is dynamically-sized. BitVector has little
overhead
> but is still dynamically-sized. std::bitset is statically-sized.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b