Is CPython Faster Without the Global Interpreter Lock(GIL)?

The Global interpreter lock(GIL) is a mechanism in CPython implementation to ensure only one thread is running at a time. This means that even if we use threads to try to speed up our programs’ runtime, this will not work because, in the end, the interpreter will block that two or more threads will be executed in parallel. As the name suggests, the GIL is a locker that a thread gets when it starts and releases at some moment. [Read More]

Lua Scripts Are Not Atomic in Redis

Redis is an in-memory data structure store, very powerful, with an excellent abstraction via its API to manipulate its data structure. What makes Redis very powerful, in my opinion, is the variety of data structures it provides and the performance of its operations. This last feature is an effect of being an in-memory store. As with every software, Redis also has technical decisions and limitations that we need to be aware of and consider when choosing it. [Read More]

Improving the check if an object is in a Set/HashMap data structure in Ruby by using better comparisons, memoization, and object orientation practices

I was verifying the performance of an endpoint in an API using framegraph when I noticed that checking if an object is in a set or a hash data structure was consuming a lot of time. This post explains the problem and the solution to it. First of all, checking if an object is in a Set or HashMap is O(1) when we don’t consider collisions. Even in the presence of collisions, it should be much less than O(n), where n is the number of items in the set. [Read More]

Peopleware: Productive Projects and Teams

First things first, this is a classic book by Tom DeMarco and Timothy Lister that everyone working in the software industry must read. The third edition divides this book into 6 parts with 39 chapters and 249 pages. It is an easy book to read and follow. However, it is necessary to stop constantly to reflect on the facts and ideas presented. Also, the reading would be like a map of the industry if you had a lot of experience in the software development industry. [Read More]