-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1643/#review3948
-----------------------------------------------------------



src/python/m5/stats/info.py
<http://reviews.gem5.org/r/1643/#comment3815>

    I'm not objecting to their removal, since in this case, it is probably 
overkill.
    
    I'm just suggesting a general speedup plan for you guys.  When you bytecode 
compile python as optimized code, all it does is remove the assert statements.  
So, in the build process where we compile all of the python objects 
(src/Sconscript, embedPyFile), we could compile optimized for m5.fast and that 
would remove all assertions.  (All that said, it's non trivial since I think 
you need to run python with -O to be able to compile optimized modules.)



src/python/m5/stats/info.py
<http://reviews.gem5.org/r/1643/#comment3814>

    I never said I was perfect!  Unfortunately, there is tons of my crappy code 
in here.
    
    Anyway,  I wasn't talking about this specific line, but the new lines below 
with the hasattr.  __getattr__ does more or less what you're doing there.  Get 
rid of the hasattr stuff, and further below, where you set 
"self.calculatedValue", change it to "self._the_value"  This will allow you to 
avoid unnecessary calls to __getattr__ (the way you've written it, you'll call 
it every time you try to get _the_value).



src/python/m5/stats/info.py
<http://reviews.gem5.org/r/1643/#comment3816>

    Same as above


- Nathan Binkert


On Jan. 29, 2013, 2:47 a.m., Andreas Hansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/1643/
> -----------------------------------------------------------
> 
> (Updated Jan. 29, 2013, 2:47 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Description
> -------
> 
> Changeset 9520:b27555e9cf3d
> ---------------------------
> stats: Optimise the text-based stats output to improve speed
> 
> The text-based stats output is slow than the original C++ output. This patch
> addresses some of those issues by removing:
> 
>     Asserts that are not required
>     stats.ValueProxy, as it is no longer required
>     Unnecessary calls to __getattr__ and __hasattr__
> 
> It also changes the formula calculation to only calculate the values and 
> totals
> of formulas if they have not been passed in from the C++. This allows other
> formulas to be added, whilst ensuring that the stats output is sufficiently
> fast.
> 
> Testing has shown a 6x - 8x increase in stats output speed.
> 
> 
> Diffs
> -----
> 
>   src/python/m5/stats/__init__.py 5532a1642108 
>   src/python/m5/stats/display.py PRE-CREATION 
>   src/python/m5/stats/info.py PRE-CREATION 
> 
> Diff: http://reviews.gem5.org/r/1643/diff/
> 
> 
> Testing
> -------
> 
> Ensure that the output files are identical
> 
> 
> Thanks,
> 
> Andreas Hansson
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to