Python Forum
Looking for clarification related to performance
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking for clarification related to performance
#1
I have come across statements saying that one should be careful about calling functions too frequently because of the performance overhead. Is this truly something that I need to be concerned about? I will assume for now that it is.

I have also come across statements warning about the use of "for" loops, also because of performance reasons, and that instead one ought to use the map feature.

However, almost all map examples call out to functions. While there are some examples with lambdas, this is probably not the best option when dealing larger and more complicated functions.

So, on the one hand, I can do a for loop and not repeatedly call function, therefore saving the function call overhead.

Or, I can use the allegedly more performant map feature in which I may have to do a function call and accept less than optimal performance.

What really are the things that I need to consider?

Thank you.
Reply


Messages In This Thread
Looking for clarification related to performance - by Pymon - Apr-02-2022, 05:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can I get some clarification on importing functions from external files. wh33t 3 945 Feb-25-2023, 08:07 PM
Last Post: deanhystad
  Read Tensorflow Documentation - Clarification IoannisDem 0 1,196 Aug-20-2021, 10:36 AM
Last Post: IoannisDem
  *args implementation and clarification about tuple status amjass12 10 4,146 Jul-07-2021, 10:29 AM
Last Post: amjass12
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 5,775 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  Just need some clarification Tonje 3 2,110 Oct-01-2020, 03:52 PM
Last Post: deanhystad
  Global Variables - Some Points Needing Clarification. adt 4 3,006 Nov-30-2019, 01:23 PM
Last Post: adt
  performance kerzol81 1 1,947 Oct-07-2019, 10:19 AM
Last Post: buran
  Clarification Hammuel 2 2,925 Oct-30-2017, 12:22 PM
Last Post: Hammuel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020