DEV Community

Siddharth Chandra
Siddharth Chandra

Posted on

Python De-Prioritise Performance ?

Python deprioritize the performance use-case, so does the developers using Python !
Although, there is one group that suffers because of this, the one that uses computing on data, the data scientists !!

But due to easy adaptability of learning/implementing python programmes, it gives no other choice to them but to learn python (mostly because of their non-programming background).

Hence, it becomes necessary to look out for options to have more performance oriented way to use python.

Here comes numerical programming libraries like numpy, scipy, tensorflow etc.

As per Brain Kihoon Lee, the magic for their enhanced performance lies in their PyObject use case.

“A NumPy array can hold many raw data within a single PyObject box, provided that all of those data are of the same type (int32, float32, etc.). By doing this, NumPy amortizes the cost of boxing over multiple data”

Such a simple yet complex strategy numpy adopted to increase performance by 30X !!

Many more interesting things are discussed in article titled “Data-oriented Programming in Python” by Brain Kihoon Lee.

One such thing is about pointer latency and how it affects the performance of Python code.

Link to article:

Data Oriented Python

Did you like the article ? What are your views on it ?

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

Try REST API Generation for MS SQL Server.

DevOps for Private APIs. With DreamFactory API Generation, you get:

  • Auto-generated live APIs mapped from database schema
  • Interactive Swagger API documentation
  • Scripting engine to customize your API
  • Built-in role-based access control

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay