Python Forum
how good is the optimization?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how good is the optimization?
#7
i like Gribouillis' solution to change the expression to have one expression for the in-between test. when i first saw that Python could do it that way, i had dismissed it in my mind as "i'm never going to do that" and for the reason that i considered it a "noobie feature". but this case shows a justification for it. it would be even more so if it were a big complex expression.

i'm going to have to look into module dis. i have't, yet. what i would like to get is the disassembly written to a file, and run it interpreted. is that what .pyc and .pyo files are, in the binary form? if so, can the python engine make the .pyc file from it?

i've long wanted to have an assembly-like language with namespace-like means to store variables, for the purpose of getting students more used to this kind of programming before they have get used to memory allocation aspects.

fyi, i once did make an isbetween(a,b,c) macro in C that would make sure the expression to be tested as between two other expression was one chunk of code. i also did that in 370 assembler macro language.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
how good is the optimization? - by Skaperen - Aug-09-2018, 04:54 AM
RE: how good is the optimization? - by Gribouillis - Aug-09-2018, 05:52 AM
RE: how good is the optimization? - by DeaD_EyE - Aug-09-2018, 07:16 AM
RE: how good is the optimization? - by Gribouillis - Aug-09-2018, 03:18 PM
RE: how good is the optimization? - by nilamo - Aug-09-2018, 06:14 PM
RE: how good is the optimization? - by micseydel - Aug-09-2018, 08:57 PM
RE: how good is the optimization? - by Skaperen - Aug-10-2018, 12:23 AM
RE: how good is the optimization? - by Gribouillis - Aug-10-2018, 06:00 PM

Forum Jump:

User Panel Messages

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