Browsing Tag

python

    Loop vs Map vs List Comprehension

    As a Python developer I have seen lots of different preferences in this topic. These preferences aside, I was set to find which of them is faster in which situations. TLDR; If you require a list of results almost always use a list comprehension. If no results are required, using a simple loop is simpler to read and faster to run. Never use the builtin map, unless its more aesthetically appealing for that piece of code and your application does…

    Continue Reading

  • 7zip vs Gzip … compression and speed

    Since we work with twitter, this comparison will be using twitter as a data-source. We have randomly selected 5k users and used their public tweets for this test. Setup The setup…

  • Python Memory Footprint

    This article applies to python 2.7 64-bit (32bit and py3k may be different) Edit: I added simpler estimate formulas along side the actual formulas, so the python memory footprint can be…