Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7991655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:21:12+00:00 2026-06-04T13:21:12+00:00

I profile my program by ‘profile.py’ on PyPy 1.8. import profile profile.run(‘run()’, filename) import

  • 0

I profile my program by ‘profile.py’ on PyPy 1.8.

import profile
profile.run('run()', filename)
import pstats
p = pstats.Stats(filename)
p.sort_stats('time').print_stats(10)

Here is output of profiling:

Fri May 25 06:40:26 2012    profile.output

         225308 function calls (220308 primitive calls) in 1832700302271.964 seconds

   Ordered by: internal time
   List reduced from 49 to 10 due to restriction <10>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    57000 15986440103363.266 280463861.463 15986440103363.266 280463861.463 :0(get)
     7000 5696817988322.265 813831141.189 5696817988322.265 813831141.189 :0(getattr)
     .....

This result shows that ‘get()’ is the bottlenecks of program.
But I don’t know ‘get()’ function at all.

What is ‘get()’ function on Python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:21:14+00:00Added an answer on June 4, 2026 at 1:21 pm

    Looks like a dictionary is used somewhere in the code being profiled.

    get(key[, default])
    
    Return the value for key if key is in the dictionary, else default. 
    If default is not given, it defaults to None, so that this method 
    never raises a KeyError.
    

    See Mapping Types – dict and Python dictionary get() Method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to profile a sample program of JAAS which is here.(http://www.devx.com/getHelpOn/Article/9915/0/page/4). I
I'm trying to profile a GO program using the procedure described here: http://blog.golang.org/2011/06/profiling-go-programs.html .
I was trying to run o-profile (a profiling program for linux) and kept getting
Is it possible to time profile a Haskell program without installing the profiling libraries?
While trying to profile my Perl program, I find that Math::Complex is taking up
Can gprof be used to profile a multi-threaded program that uses pthreads? That is,
I was trying to learn how to profile a simple python program using hotshot,
I am trying run a program from a qmake .pro file which modifies the
I'm looking for a way to profile my openMPI program in C, i'm using
I want to run a java program on a linux server in profiling mode.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.