Guest User

Untitled

a guest
Nov 20th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. The following uses the new --stagestats option to report on the amount
  2. of memory consumed and PMCs allocated at each stage of compilation.
  3. I'm running it on four NQP scripts; each script has one more "say(n);"
  4. statement than the one before it.
  5.  
  6.  
  7. -------Memory=------ ------PMCs------
  8. Sec Alloc Used Total Active
  9.  
  10. pmichaud@kiwi:~/p6/nqp$ for i in x1 x2 x3 x4; do echo "$i:"; cat $i; ./nqp --stagestats=2 $i >/dev/null; echo ""; done
  11. x1:
  12. say(1);
  13. Stage start : 0.000 7294976 5887747 41820 41508
  14. Stage parse : 0.048 20795392 18388950 137700 137406
  15. Stage past : 0.000 20803584 18401440 137700 137469
  16. Stage post : 0.004 22114304 19641141 143310 143189
  17. Stage pir : 0.001 22589440 20139592 145860 145452
  18. Stage evalpmc : 0.002 22904832 20196396 145860 145647
  19.  
  20. x2:
  21. say(1);
  22. say(2);
  23. Stage start : 0.000 7294976 5887779 41820 41508
  24. Stage parse : 0.051 21258240 18825625 140250 140154
  25. Stage past : 0.000 21270528 18838115 140250 140217
  26. Stage post : 0.004 22646784 20132386 146370 146189
  27. Stage pir : 0.001 23134208 20646346 148920 148529
  28. Stage evalpmc : 0.002 23445504 20703291 148920 148724
  29.  
  30. x3:
  31. say(1);
  32. say(2);
  33. say(3);
  34. Stage start : 0.000 7294976 5887811 41820 41508
  35. Stage parse : 0.052 21729280 19263668 143310 142902
  36. Stage past : 0.000 21745664 19276158 143310 142965
  37. Stage post : 0.004 23162880 20624966 149430 149189
  38. Stage pir : 0.001 23932928 21153098 151980 151600
  39. Stage evalpmc : 0.002 23986176 21210183 151980 151795
  40.  
  41. x4:
  42. say(1);
  43. say(2);
  44. say(3);
  45. say(4);
  46. Stage start : 0.000 7294976 5887843 41820 41508
  47. Stage parse : 0.053 22183936 19701032 145860 145650
  48. Stage past : 0.000 22200320 19713522 145860 145713
  49. Stage post : 0.004 23674880 21116867 152490 152189
  50. Stage pir : 0.001 24453120 21659123 155040 154671
  51. Stage evalpmc : 0.002 24510464 21716348 155040 154866
  52.  
  53. pmichaud@kiwi:~/p6/nqp$
  54.  
  55.  
  56. Apparent result: each say(n); statement requires ~2700 active PMCs and ~400KB of memory for parse+past.
Add Comment
Please, Sign In to add comment