Python Forum
Are there optimizer for static code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Are there optimizer for static code?
#6
(Nov-02-2019, 08:57 AM)DeaD_EyE Wrote: Maybe you can post some example code with example data.

Presenting the code will be difficult, because it is scattered across multiple files. But the main idea is quite simple to state: I have a set of csv- files, separated by the month. My task is to execute high-level business logic on each line from these files. The architect is represented by the following components:
1. Command - works with business logic for each line of file.
2. Storage - allows to change the way data is stored (files, database, internet, generation...), i.e. makes a call to the selected method of data storage.
3. DatŠ° - organizes enumeration of files in the desired date range.
4. Converter - convert data from str to needed types.
5. File - actually receives the data from csv- file.

See how deep a call stack is for each line of data from a file? With such a stack, the overhead significantly exceeds the complexity of the useful work (i.e. parsing the string).
Reply


Messages In This Thread
RE: Are there optimizer for static code? - by AlekseyPython - Nov-03-2019, 07:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem usage of static method akbarza 5 588 Feb-03-2024, 07:43 AM
Last Post: paul18fr
  Static type checking with PyPy pitosalas 1 493 Dec-14-2023, 09:29 PM
Last Post: deanhystad
  Class member become static Quasar999 1 717 Sep-16-2023, 12:52 PM
Last Post: deanhystad
Photo Output Static image on HDMI2 random816382 0 1,420 Oct-18-2021, 11:21 AM
Last Post: random816382
Question Google Foobar- Code works in my IDE but not in foobar. Static method? pr3ttykitty 4 4,998 Feb-24-2021, 05:03 PM
Last Post: nilamo
  Using static methods for library? giu88 4 2,958 Sep-12-2018, 07:52 AM
Last Post: giu88
  Notebook is rendered as static html by github miner_tom 2 3,154 Aug-23-2018, 09:00 PM
Last Post: perfringo
  need to alter static picture to video file mika 1 2,770 Feb-23-2018, 02:11 PM
Last Post: ka06059
  Updating & Accessing a "Static" List Bass 4 4,468 May-23-2017, 07:12 PM
Last Post: Bass

Forum Jump:

User Panel Messages

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