Plurrrr

Sat 25 Sep 2021

Make Python Run Faster: A Machine Learning Perspective

Python has a great ecosystem for machine learning, but deep learning is computationally intensive and Python is slow. In this post, I will discuss different ways that helped to make my code run faster, more specifically in physics simulation and reinforcement learning for character animations. Nevertheless, most of the tips are applicable to all computationally intensive programs.

With that, here are the 7 ways to make any Python code run faster:

  1. Make Your Machine Run Faster
  2. Try Different Python Versions and Distributions
  3. Profile and Optimize
  4. Be Mindful of Type Conversions
  5. Be Strategic About Memory Allocations
  6. Be Clever When Writing If-Statements
  7. Be Cautious When Using Packages

Source: Make Python Run Faster: A Machine Learning Perspective.

How Replication Works in MySQL

MySQL has a feature known as replication where data from one database server (referred to as the source or primary) is copied to other database servers (replicas). Conceptually, it’s pretty straight forward. All of your data mutations (INSERT, UPDATE, DELETE, ALTER, etc.) are done against the primary database. Those commands are then copied and applied to the replicas.

Source: How Replication Works in MySQL, an article by Ryan Siemens.