iamaamir

python pow functions benchmark

Apr 3rd, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. Configuration:
  2. Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz
  3. Core Processor DRAM Controller
  4.  
  5. creadit: http://chap09.blogspot.in
  6.  
  7.  
  8. Testing Pow functions
  9. --------------------------------------------------
  10. Custom/Recursive function
  11.  
  12. 0 JUMP_IF_TRUE_OR_POP 30575
  13. 3 LOAD_NAME 10354 (10354)
  14. 6 <49>
  15. 7 <48>
  16. 8 <44>
  17. 9 SLICE+2
  18. 10 <49>
  19. 11 <48>
  20. 12 <48>
  21. 13 STORE_SLICE+1
  22. 103 function calls (3 primitive calls) in 0.000 seconds
  23.  
  24. Ordered by: standard name
  25.  
  26. ncalls tottime percall cumtime percall filename:lineno(function)
  27. 1 0.000 0.000 0.000 0.000 <string>:1(<module>)
  28. 101/1 0.000 0.000 0.000 0.000 pow.py:7(power)
  29. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
  30.  
  31.  
  32. execution time 0.000048
  33. --------------------------------------------------
  34. built in math.pow function
  35.  
  36. 0 IMPORT_FROM 29793 (29793)
  37. 3 BUILD_SET 28718
  38. 6 JUMP_IF_FALSE_OR_POP 10359
  39. 9 <49>
  40. 10 <48>
  41. 11 <44>
  42. 12 SLICE+2
  43. 13 <49>
  44. 14 <48>
  45. 15 <48>
  46. 16 STORE_SLICE+1
  47. 3 function calls in 0.000 seconds
  48.  
  49. Ordered by: standard name
  50.  
  51. ncalls tottime percall cumtime percall filename:lineno(function)
  52. 1 0.000 0.000 0.000 0.000 <string>:1(<module>)
  53. 1 0.000 0.000 0.000 0.000 {math.pow}
  54. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
  55.  
  56.  
  57. execution time 0.000002
  58. --------------------------------------------------
  59. built in operators 10 ** 100
  60.  
  61. 0 <49>
  62. 1 <48>
  63. 2 SLICE+2
  64. 3 STORE_SLICE+2
  65. 4 STORE_SLICE+2
  66. 5 SLICE+2
  67. 6 <49>
  68. 7 <48>
  69. 8 <48>
  70. 2 function calls in 0.000 seconds
  71.  
  72. Ordered by: standard name
  73.  
  74. ncalls tottime percall cumtime percall filename:lineno(function)
  75. 1 0.000 0.000 0.000 0.000 <string>:1(<module>)
  76. 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}
  77.  
  78.  
  79. execution time 0.000001
Add Comment
Please, Sign In to add comment