The Python Oracle

Fast Numerical Integration in Python

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Flying Over Ancient Lands

--

Chapters
00:00 Fast Numerical Integration In Python
01:09 Accepted Answer Score 4
01:30 Thank you

--

Full question
https://stackoverflow.com/questions/2030...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #numpy #numericalmethods

#avk47



ACCEPTED ANSWER

Score 4


If you have lot's of these to do and f is more complicated than your example, you could get some benefits from memoizing f and possibly g.

What is memoization and how can I use it in Python?

Basically, anywhere you can, cache a computation and trade memory for cpu.