# Memoization in python
3 min read
Memoization is loosely defined as an optimization technique that is usually applied on functions that are quite expensive to run.
Memoization is loosely defined as an optimization technique that is usually applied on functions that are quite expensive to run.
There are several cases where we need to generate a unique identifier in our applications. One way to do it is to roll your own implementation, usually randomly picking characters in a recursive way.
Recently, I had to parse an SQL-like statement coming in as a query parameter for an python API endpoint. This mini query language had to support AND, OR and NOT operations and allow nested…