Skip to content Skip to sidebar Skip to footer
Showing posts with the label Profiling

Python Generator Vs Callback Function

I have a class that solves an exact cover problem using a recursive, backtracking algorithm. Origin… Read more Python Generator Vs Callback Function

Optimizing For Pypy

(This is a follow-up to Statistical profiler for PyPy) I'm running some Python code under PyPy … Read more Optimizing For Pypy

Saving Cprofile Results To Readable External File

I am using cProfile try to profile my codes: pr = cProfile.Profile() pr.enable() my_func() # the … Read more Saving Cprofile Results To Readable External File

Time Python Scripts Using Ipython Magic

How can I time the execution of a Python script using the iPython %time or %%timeit magic commands?… Read more Time Python Scripts Using Ipython Magic

Calculating The Factorial Without Trailing Zeros Efficiently?

I'm trying to improve the running time of the factorial calculation of the large number. The fi… Read more Calculating The Factorial Without Trailing Zeros Efficiently?

Speeding Up Datetime.strptime

I am using the following piece of code to extract a date from a string: try: my_date = datetime… Read more Speeding Up Datetime.strptime

How Can I "hook Into" Python From C++ When It Executes A Function? My Goal Is To Profile

I'm implementing a profiler in an application and I'm a little flummoxed about how to imple… Read more How Can I "hook Into" Python From C++ When It Executes A Function? My Goal Is To Profile