Tuesday 29 November 2016

Profiling Python Code in Jupyter Notebook

   You probably know, that there is a cool stuff: jupyter notebook. I've recently implemented some data structures in python.  
    Here, there is a, call it, "live session" of profilling one of them in the notebook and I think, notebook is great tool to it.





Sunday 20 November 2016

Python Data Structures

Playing with python3, I've written some data structures implementations - AVL tree, double linked list and min heap. Code here.    
    Anybody learning python welcome to test them, there is also place to implement more functionalities, like  min, max in AVL or reverse list.  
   More code will, hopefully,  come soon.

Wednesday 16 November 2016

Bit Tricks

After reading some passages from fantastic Henry S. Warren  "Hacker's Delights", I've implented and tested few functions. Code with commentary here .
    Works faster (sometimes 2 times) than naive implementation, and not worst than functions from math.h, I enabled all compiler optimizations. Feel free to check how it works in java or C#!

Wednesday 9 November 2016

Map, filter and reduce in C.

I think, this is useless, but I've written map, filter and reduce in C. Code here. No side effects, pure functions, tail recursive, well... iterative;)

Monday 7 November 2016

Few Benchmarks

I've recently played with ipython notebook, and decided to make some speed comparisons, between java, python and scheme (racket)  - can be viewed here.

Edit! After small changes results has changed too.
Edit2! Additional tests here.