Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld-decode profiling notes/performance enhancements #575

Closed
happycube opened this issue Nov 28, 2020 · 1 comment
Closed

ld-decode profiling notes/performance enhancements #575

happycube opened this issue Nov 28, 2020 · 1 comment
Assignees

Comments

@happycube
Copy link
Owner

I lost the snippets from the last pass at profiling, so I'll add them here:

at top:

from line_profiler import LineProfiler

in field.decodefield:

        lpf = LineProfiler()
        lpf.add_function(f.refine_linelocs_burst)
        lpf.add_function(f.get_burstlevel)
        lpf.add_function(f.compute_line_bursts)
        lpf.add_function(f.compute_burst_offsets)
        lpf_wrapper = lpf(f.process)

        try:
            lpf_wrapper()
            #f.process()
            lpf.print_stats()
        except (KeyboardInterrupt, SystemExit):
            raise
        except Exception as e:
            raise e

This prints a good number of hotspots, and the upcoming commit based on it will be >=10% faster than current git on NTSC at least.

@happycube
Copy link
Owner Author

Good ones for PAL, but the PAL specific TBC code doesn't have many hotspots...

        lpf = LineProfiler()
        lpf.add_function(f.refine_linelocs_pilot)
        lpf.add_function(Field.process)
        lpf.add_function(Field.compute_linelocs)
        lpf_wrapper = lpf(f.process)

happycube added a commit that referenced this issue Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant