How good is Cython
Python optimization: Cython
The Python code is optimized. All tasks are parallelized, the CPUs all run at 99%. The database is optimized. The hardware is exhausted. Nevertheless, a factor of 30 must still be gained in computing time.
There are now only a few options:
- Different programming language / platform / framework
- Outsourcing of computing processes to the GPU
- Optimizing the Python code with Cython
If there is no other way left open:
- the first option is the worst. Your own development team either has to learn something completely new or new team members have to be laboriously integrated into the team.
- outsourcing processes to the GPU can bring about a huge increase in computing power (factor 100/1000) if the problem can be transformed accordingly. It should also be remembered that the corresponding GPU hardware / licenses have to be bought / managed. No chance without external specialists. The adjustments can then be made by yourself with trained developers.
- Optimization with Cython (factor 2-40) usually doesn't happen just like that. External specialists can quickly establish a knowledge transfer that enables in-house developers to optimize your existing code. The Cython optimization is also hardly dependent on the problem / hardware.
Course content:After a simple introduction to how Cython works, an algorithm given in Python (QuadTree) is ported piece by piece to Python.
With this port you will learn to find bottlenecks in your Python code. Because we show you which performance problems the Python / Numpy data structures suffer from.
Three points are specifically deepened:
- Effective use of numpy arrays from within Cython with memory views
- "Cython extension types": Object-oriented Cython and its limits
- "Exception handling": How to route exceptions from Cython to Python.
After successfully completing this course you should be able to do the following yourself with Cython:
Create high-performance subroutines
Even writing object-oriented Cython with "Extension types".
Have a generally better understanding of optimization.
- Boris Johnson is a good problem solver
- How many types of domains are there
- Why isn't amazon jet com copying
- Are you sad about something?
- What do you think of teenage parents
- What are the best tool kits
- Which factors are taken into account in demographics?
- Do hamburgers really have their origin in Hamburg?
- Why do crowds always sound the same
- How is college life in COEP
- How reliable is the story
- What is further north Hungary or Bulgaria
- What causes rancidity What are its effects
- What week of the year is 2019
- Are national secularism and prosperity positively correlated?
- Has Bruce Lee ever hospitalized anyone
- Who were Eckhart Tolles greatest influences
- How can I soften my mustache
- How much does remarketing cost
- Who can join IoT
- The next generation of the internet
- How do educational startups make money
- What is the best stone for the countertop
- Can Deadpool beat Goku