Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Different runtime programs
#1
Hello!
Why does the speed of performance of functions differ depending on where they are launched?
If I run in the console - program runs faster than in IDE (I use Wing IDE)
Example.
Execution time in console:
3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40)
_________________________________
forLoop : 1.8672226498562265 =>
_________________________________
listComp : 1.0452214996682148 =>
_________________________________
mapCall : 0.5306503870825039 =>
_________________________________
genExpr : 1.427833488166335 =>
_________________________________
genFunc : 1.4664546781685468 =>

Execution time in IDE:

3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40)
_________________________________
forLoop : 4.45649404998894 =>
_________________________________
listComp : 1.9458866622428665 =>
_________________________________
mapCall : 0.5576458305684584 =>
_________________________________
genExpr : 12.455734571997347 =>
_________________________________
genFunc : 12.939494802034947 =>

I use a small function
def timer(func, *pargs, **kargs):
    start = time.clock()
    for i in repslist:
        ret = func(*pargs, **kargs)
    elapsed = time.clock() - start
    return (elapsed, ret)
Start of program execution
start = time.clock()

And how much time is spent
elapsed = time.clock() - start

For some reason, different execution times in the console and IDE
Reply
#2
I'd ask the people who made that IDE that question. And then maybe get a new IDE.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  class and runtime akbarza 4 359 Mar-16-2024, 01:32 PM
Last Post: deanhystad
  painfully slow runtime when handling data dadazhu 3 962 Jan-20-2023, 07:11 PM
Last Post: snippsat
  Big O runtime nested for loop and append yarinsh 4 1,387 Dec-31-2022, 11:50 PM
Last Post: stevendaprano
  Reducing runtime memory usage in Cpython interpreter david_the_graower 2 2,217 Oct-18-2021, 09:56 PM
Last Post: david_the_graower
  Object reference in Dict - not resolved at runtime benthomson 2 1,843 Apr-02-2020, 08:50 AM
Last Post: benthomson
  PyCharm asking for VC++ runtime 14.0 whereas I have already installed VC++ 19.0 SarmadiRizvi 1 1,822 Apr-02-2020, 06:17 AM
Last Post: snippsat
  EOFError: EOF when reading a line - Runtime Error RavCOder 6 9,651 Sep-27-2019, 12:22 PM
Last Post: RavCOder
  PyDev package install/download at runtime user2103 0 2,475 Jan-30-2018, 08:39 AM
Last Post: user2103
  Question on runtime and improving nested for loops ackmondual 1 3,047 Jun-13-2017, 11:11 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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