Performance matters.

I have recently played participated in Olimex Weekend Programming Challenge (http://olimex.wordpress.com/2013/04/05/weekend-programming-challenge-issue-3/).
I have coded my solution in Python, and created custom C module to speed up string decomposition.

I like solving puzzles and I have great fun trying to make my code as fast as possible played with sets and dictionaries and found that dictionaries are little bit faster then sets (I was using Python 2.7). To spot the difference I used input file with 221k rows.

excution time [s]
dictionary 14.856
set 15.541

I have performed some tests with various test vectors, to see how the algoritm behaves when input data size changes.

performance-matters

As you can see execution time raises linearly with the number of characters in the input file.

You can see the source code of my soulution at: https://github.com/OLIMEX/WPC/tree/master/ISSUE-3/SOLUTION-10

Advertisements
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s