Advertisement
Guest User

Graham scan compare

a guest
Mar 5th, 2015
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. == Ugly version ==========================================================================
  2. Thu Mar 5 08:57 2015 Time and Allocation Profiling Report (Final)
  3.  
  4. graham.opt +RTS -p -t -RTS
  5.  
  6. total time = 4.04 secs (4043 ticks @ 1000 us, 1 processor)
  7. total alloc = 3,472,049,432 bytes (excludes profiling overheads)
  8.  
  9. COST CENTRE MODULE %time %alloc
  10.  
  11. lowestYPoint Main 20.2 23.5
  12. sortByAngle.comparePoints Main 19.5 0.0
  13. sortByAngle Main 18.6 35.3
  14. directions_ Main 7.1 15.0
  15. cosineAB Main 6.7 0.0
  16. grahamScanDirections Main 5.4 6.9
  17. direction Main 5.2 0.0
  18. filterByList Main 5.2 6.5
  19. ycoord Main 3.6 5.5
  20. main Main 3.2 2.5
  21. grahamScan.ps1 Main 1.5 0.7
  22. grahamScan.bool_list Main 1.4 2.1
  23. grahamScan Main 1.1 0.7
  24. pss Main 0.6 1.4
  25.  
  26. == Good looking version ==================================================================
  27. Thu Mar 5 08:56 2015 Time and Allocation Profiling Report (Final)
  28.  
  29. graham.opt +RTS -p -t -RTS
  30.  
  31. total time = 5.65 secs (5646 ticks @ 1000 us, 1 processor)
  32. total alloc = 4,504,049,432 bytes (excludes profiling overheads)
  33.  
  34. COST CENTRE MODULE %time %alloc
  35.  
  36. sortByAngle Main 18.0 27.2
  37. lowestYPoint Main 17.8 18.1
  38. filterByList Main 16.5 27.4
  39. sortByAngle.comparePoints Main 15.8 0.0
  40. directions_ Main 5.8 11.5
  41. cosineAB Main 5.3 0.0
  42. grahamScanDirections Main 4.9 5.3
  43. direction Main 4.3 0.0
  44. main Main 3.8 2.0
  45. ycoord Main 2.9 4.3
  46. grahamScan Main 1.7 1.1
  47. grahamScan.ps1 Main 1.4 0.5
  48. grahamScan.bool_list Main 0.9 1.6
  49. pss Main 0.3 1.1
  50.  
  51. == Makefile ============================================================================
  52. graham.opt: graham.opt.hs
  53. ghc -O2 -prof -fprof-auto -rtsopts graham.opt.hs
  54.  
  55. graham.org: graham.org.hs
  56. ghc -O2 -prof -fprof-auto -rtsopts graham.org.hs
  57.  
  58. clean:
  59. rm *.hi *.o graham.opt graham.org
  60.  
  61. prof: graham.opt graham.org
  62. time ./graham.opt +RTS -p -t
  63. time ./graham.org +RTS -p -t
  64.  
  65. == Tests ==============================================================================
  66. pss = replicate 1000000
  67. [ Point 1 0
  68. , Point 1 2
  69. , Point 0 3
  70. , Point 2 3
  71. , Point 2 2
  72. , Point 3 2
  73. , Point 2 1
  74. ]
  75.  
  76. instance NFData Point where
  77. rnf a = a `seq` ()
  78.  
  79. main = (map grahamScan pss) `deepseq` putStrLn "Done"
  80.  
  81. == Information ================================================================================
  82. The Glorious Glasgow Haskell Compilation System, version 7.8.3
  83. Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz
  84. Linux zigazou 3.2.0-77-generic #112-Ubuntu SMP Tue Feb 10 15:22:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement