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

How Much Overhead Do Decorators Add To Python Function Calls

I've been playing around with a timing decorator for my pylons app to provide on the fly timing… Read more How Much Overhead Do Decorators Add To Python Function Calls

What Is The Time Complexity Of .at And .loc In Pandas?

I'm looking for the time complexity of these methods as a function of the number of rows in a d… Read more What Is The Time Complexity Of .at And .loc In Pandas?

Optimize This Function With Numpy (or Other Vectorization Methods)

I am computing with Python a classic calculation in the field of population genetics. I am well awa… Read more Optimize This Function With Numpy (or Other Vectorization Methods)

Slow Len Function On Dask Distributed Dataframe

I have been testing how to use dask (cluster with 20 cores) and I am surprised by the speed that I … Read more Slow Len Function On Dask Distributed Dataframe

Speed Up Comparison Of Floats Between Lists

I have a block of code which does the following: take a float from a list, b_lst below, of index i… Read more Speed Up Comparison Of Floats Between Lists

Why Is Piping Output Of Subprocess So Unreliable With Python?

(Windows) I wrote some Python code that calls the program SoX (subprocess module), which outputs th… Read more Why Is Piping Output Of Subprocess So Unreliable With Python?

Speeding Up Numpy.dot

I've got a numpy script that spends about 50% of its runtime in the following code: s = numpy.d… Read more Speeding Up Numpy.dot

Replacing The Empty Strings In A String

I accidentally found that in python, an operation of the form string1.join(string2) Can be equival… Read more Replacing The Empty Strings In A String

Python Execution Speed: Laptop Vs Desktop

I am running a program that does simple data processing: parses text populates dictionaries calcul… Read more Python Execution Speed: Laptop Vs Desktop

How Efficient Is Python's Max Function

The function max() which returns the maximum element from a list . . . what is its running time (in… Read more How Efficient Is Python's Max Function

Is There Any Good Way To Optimize The Speed Of This Python Code?

I have a following piece of code, which basically evaluates some numerical expression, and use it t… Read more Is There Any Good Way To Optimize The Speed Of This Python Code?

Reasons Of Slowness In Numpy.dot() Function And How To Mitigate Them If Custom Classes Are Used?

I am profiling a numpy dot product call. numpy.dot(pseudo,pseudo) pseudo is a numpy array of cust… Read more Reasons Of Slowness In Numpy.dot() Function And How To Mitigate Them If Custom Classes Are Used?

Efficient Way Of Xml Parsing In Elementtree(1.3.0) Python

I am trying to parse a huge XML file ranging from (20MB-3GB). Files are samples coming from differe… Read more Efficient Way Of Xml Parsing In Elementtree(1.3.0) Python

Numpy.sum Performance Depending On Axis

When summing over a dimension in a numpy array, is there a performance difference between the first… Read more Numpy.sum Performance Depending On Axis

Summing With A For Loop Faster Than With Reduce?

I wanted to see how much faster reduce was than using a for loop for simple numerical operations. H… Read more Summing With A For Loop Faster Than With Reduce?

Why Is Pool.map Slower Than Normal Map?

I'm trying the following code: import multiprocessing import time import random def square(x):… Read more Why Is Pool.map Slower Than Normal Map?

Good Graph Traversal Algorithm

Abstract problem : I have a graph of about 250,000 nodes and the average connectivity is around 10.… Read more Good Graph Traversal Algorithm

Python Time.sleep Vs Busy Wait Accuracy

I was playing around with the time.sleep function from python's standard library and found it i… Read more Python Time.sleep Vs Busy Wait Accuracy

How To Efficiently Detect An Xml Schema Without Having The Entire File In Python

I have a very large feed file that is sent as an XML document (5GB). What would be the fastest way … Read more How To Efficiently Detect An Xml Schema Without Having The Entire File In Python

Python Combinations Of 2 Lists

What is the pythonic way to calculated all the product combinations of two lists. So given two list… Read more Python Combinations Of 2 Lists