Skip to content

Instantly share code, notes, and snippets.

@K-ballo

K-ballo/results Secret

Last active December 25, 2015 23:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save K-ballo/a44590159133997abcdc to your computer and use it in GitHub Desktop.
Save K-ballo/a44590159133997abcdc to your computer and use it in GitHub Desktop.
----------------------------------------------------------------
50 elements in a fusion::map, accessing the 26th one
C++98:
Execution times (seconds)
phase parsing : 5.29 (97%) usr 349702 kB (98%) ggc
phase lang. deferred : 0.01 ( 0%) usr 771 kB ( 0%) ggc
phase opt and generate : 0.09 ( 2%) usr 2927 kB ( 1%) ggc
phase last asm : 0.08 ( 1%) usr 1378 kB ( 0%) ggc
|name lookup : 0.08 ( 1%) usr 6936 kB ( 2%) ggc
|overload resolution : 0.08 ( 1%) usr 3894 kB ( 1%) ggc
garbage collection : 0.05 ( 1%) usr 0 kB ( 0%) ggc
callgraph construction : 0.01 ( 0%) usr 45 kB ( 0%) ggc
df scan insns : 0.01 ( 0%) usr 9 kB ( 0%) ggc
preprocessing : 3.02 (55%) usr 267441 kB (75%) ggc
parser (global) : 0.11 ( 2%) usr 39158 kB (11%) ggc
parser struct body : 0.39 ( 7%) usr 15802 kB ( 4%) ggc
parser inl. meth. body : 0.24 ( 4%) usr 13691 kB ( 4%) ggc
template instantiation : 1.46 (27%) usr 9473 kB ( 3%) ggc
inline parameters : 0.01 ( 0%) usr 131 kB ( 0%) ggc
integrated RA : 0.02 ( 0%) usr 813 kB ( 0%) ggc
final : 0.04 ( 1%) usr 195 kB ( 0%) ggc
symout : 0.11 ( 2%) usr 5660 kB ( 2%) ggc
TOTAL : 5.48 355382 kB
C++98 (preprocessed):
Execution times (seconds)
phase setup : 0.01 ( 0%) usr 547 kB ( 0%) ggc
phase parsing : 2.64 (93%) usr 112842 kB (95%) ggc
phase lang. deferred : 0.01 ( 0%) usr 771 kB ( 1%) ggc
phase opt and generate : 0.09 ( 3%) usr 2927 kB ( 2%) ggc
phase last asm : 0.08 ( 3%) usr 1370 kB ( 1%) ggc
|name lookup : 0.11 ( 4%) usr 6936 kB ( 6%) ggc
|overload resolution : 0.07 ( 3%) usr 3894 kB ( 3%) ggc
preprocessing : 0.45 (16%) usr 30597 kB (26%) ggc
parser (global) : 0.09 ( 3%) usr 39157 kB (33%) ggc
parser struct body : 0.30 (11%) usr 15800 kB (13%) ggc
parser function body : 0.01 ( 0%) usr 649 kB ( 1%) ggc
parser inl. func. body : 0.01 ( 0%) usr 214 kB ( 0%) ggc
parser inl. meth. body : 0.26 ( 9%) usr 13689 kB (12%) ggc
template instantiation : 1.47 (52%) usr 9465 kB ( 8%) ggc
expand : 0.01 ( 0%) usr 328 kB ( 0%) ggc
integrated RA : 0.01 ( 0%) usr 813 kB ( 1%) ggc
LRA non-specific : 0.01 ( 0%) usr 0 kB ( 0%) ggc
final : 0.03 ( 1%) usr 195 kB ( 0%) ggc
symout : 0.14 ( 5%) usr 5649 kB ( 5%) ggc
TOTAL : 2.83 118514 kB
C++11 (recursive):
Execution times (seconds)
phase setup : 0.01 ( 1%) usr 653 kB ( 1%) ggc
phase parsing : 0.88 (70%) usr 74763 kB (88%) ggc
phase lang. deferred : 0.04 ( 3%) usr 1786 kB ( 2%) ggc
phase opt and generate : 0.15 (12%) usr 5052 kB ( 6%) ggc
phase last asm : 0.18 (14%) usr 3153 kB ( 4%) ggc
|name lookup : 0.02 ( 2%) usr 2588 kB ( 3%) ggc
|overload resolution : 0.05 ( 4%) usr 2885 kB ( 3%) ggc
df scan insns : 0.01 ( 1%) usr 16 kB ( 0%) ggc
df live regs : 0.02 ( 2%) usr 0 kB ( 0%) ggc
alias analysis : 0.01 ( 1%) usr 10 kB ( 0%) ggc
preprocessing : 0.32 (25%) usr 31610 kB (37%) ggc
parser (global) : 0.11 ( 9%) usr 12970 kB (15%) ggc
parser struct body : 0.09 ( 7%) usr 6501 kB ( 8%) ggc
parser function body : 0.03 ( 2%) usr 1210 kB ( 1%) ggc
parser inl. meth. body : 0.02 ( 2%) usr 863 kB ( 1%) ggc
template instantiation : 0.28 (22%) usr 17477 kB (20%) ggc
tree CFG cleanup : 0.01 ( 1%) usr 0 kB ( 0%) ggc
dominance computation : 0.01 ( 1%) usr 0 kB ( 0%) ggc
expand : 0.01 ( 1%) usr 435 kB ( 1%) ggc
integrated RA : 0.00 ( 0%) usr 1289 kB ( 2%) ggc
LRA non-specific : 0.01 ( 1%) usr 0 kB ( 0%) ggc
LRA virtuals elimination: 0.01 ( 1%) usr 35 kB ( 0%) ggc
thread pro- & epilogue : 0.01 ( 1%) usr 242 kB ( 0%) ggc
final : 0.05 ( 4%) usr 351 kB ( 0%) ggc
symout : 0.25 (20%) usr 9199 kB (11%) ggc
TOTAL : 1.26 85440 kB
C++11 (non-recursive):
Execution times (seconds)
phase parsing : 0.79 (95%) usr 70483 kB (96%) ggc
phase lang. deferred : 0.03 ( 4%) usr 1432 kB ( 2%) ggc
phase opt and generate : 0.01 ( 1%) usr 795 kB ( 1%) ggc
|name lookup : 0.01 ( 1%) usr 3050 kB ( 4%) ggc
|overload resolution : 0.16 (19%) usr 9627 kB (13%) ggc
preprocessing : 0.37 (45%) usr 31612 kB (43%) ggc
parser (global) : 0.05 ( 6%) usr 13045 kB (18%) ggc
parser struct body : 0.10 (12%) usr 6494 kB ( 9%) ggc
parser function body : 0.02 ( 2%) usr 837 kB ( 1%) ggc
parser inl. func. body : 0.02 ( 2%) usr 375 kB ( 1%) ggc
parser inl. meth. body : 0.03 ( 4%) usr 849 kB ( 1%) ggc
template instantiation : 0.16 (19%) usr 13246 kB (18%) ggc
tree gimplify : 0.01 ( 1%) usr 377 kB ( 1%) ggc
symout : 0.06 ( 7%) usr 5306 kB ( 7%) ggc
TOTAL : 0.83 73373 kB
----------------------------------------------------------------
255 elements in a fusion::map, accessing the 129th one
C++11 (recursive):
Execution times (seconds)
phase setup : 0.01 ( 0%) usr 653 kB ( 0%) ggc
phase parsing : 48.74 (86%) usr 274275 kB (74%) ggc
phase lang. deferred : 0.85 ( 1%) usr 10336 kB ( 3%) ggc
phase opt and generate : 1.18 ( 2%) usr 29074 kB ( 8%) ggc
phase last asm : 6.16 (11%) usr 56660 kB (15%) ggc
|name lookup : 0.24 ( 0%) usr 4410 kB ( 1%) ggc
|overload resolution : 0.92 ( 2%) usr 15085 kB ( 4%) ggc
garbage collection : 0.26 ( 0%) usr 0 kB ( 0%) ggc
callgraph construction : 0.10 ( 0%) usr 497 kB ( 0%) ggc
callgraph optimization : 0.01 ( 0%) usr 531 kB ( 0%) ggc
cfg cleanup : 0.01 ( 0%) usr 0 kB ( 0%) ggc
trivially dead code : 0.01 ( 0%) usr 0 kB ( 0%) ggc
df scan insns : 0.03 ( 0%) usr 80 kB ( 0%) ggc
df live regs : 0.01 ( 0%) usr 0 kB ( 0%) ggc
preprocessing : 0.42 ( 1%) usr 32061 kB ( 9%) ggc
parser (global) : 0.08 ( 0%) usr 12970 kB ( 3%) ggc
parser struct body : 0.11 ( 0%) usr 6501 kB ( 2%) ggc
parser function body : 0.73 ( 1%) usr 8756 kB ( 2%) ggc
parser inl. func. body : 0.01 ( 0%) usr 373 kB ( 0%) ggc
parser inl. meth. body : 0.02 ( 0%) usr 863 kB ( 0%) ggc
template instantiation : 47.45 (83%) usr 187705 kB (51%) ggc
inline parameters : 0.00 ( 0%) usr 1035 kB ( 0%) ggc
tree gimplify : 0.04 ( 0%) usr 1800 kB ( 0%) ggc
tree eh : 0.01 ( 0%) usr 636 kB ( 0%) ggc
tree CFG construction : 0.00 ( 0%) usr 1223 kB ( 0%) ggc
tree CFG cleanup : 0.01 ( 0%) usr 0 kB ( 0%) ggc
tree operand scan : 0.00 ( 0%) usr 1046 kB ( 0%) ggc
dominance computation : 0.01 ( 0%) usr 0 kB ( 0%) ggc
out of ssa : 0.01 ( 0%) usr 0 kB ( 0%) ggc
expand vars : 0.01 ( 0%) usr 251 kB ( 0%) ggc
expand : 0.08 ( 0%) usr 3869 kB ( 1%) ggc
post expand cleanups : 0.01 ( 0%) usr 325 kB ( 0%) ggc
integrated RA : 0.11 ( 0%) usr 6376 kB ( 2%) ggc
LRA non-specific : 0.03 ( 0%) usr 0 kB ( 0%) ggc
LRA virtuals elimination: 0.01 ( 0%) usr 175 kB ( 0%) ggc
thread pro- & epilogue : 0.01 ( 0%) usr 1198 kB ( 0%) ggc
shorten branches : 0.02 ( 0%) usr 0 kB ( 0%) ggc
final : 0.51 ( 1%) usr 3472 kB ( 1%) ggc
symout : 6.71 (12%) usr 96551 kB (26%) ggc
rest of compilation : 0.05 ( 0%) usr 1450 kB ( 0%) ggc
unaccounted todo : 0.02 ( 0%) usr 0 kB ( 0%) ggc
TOTAL : 56.93 371107 kB
C++11 (non-recursive):
Execution times (seconds)
phase setup : 0.01 ( 0%) usr 653 kB ( 0%) ggc
phase parsing : 1.84 (63%) usr 121558 kB (79%) ggc
phase lang. deferred : 0.12 ( 4%) usr 4604 kB ( 3%) ggc
phase opt and generate : 0.66 (23%) usr 21822 kB (14%) ggc
phase last asm : 0.23 ( 8%) usr 5305 kB ( 3%) ggc
|name lookup : 0.09 ( 3%) usr 6622 kB ( 4%) ggc
|overload resolution : 0.98 (34%) usr 45854 kB (30%) ggc
callgraph construction : 0.02 ( 1%) usr 328 kB ( 0%) ggc
callgraph optimization : 0.01 ( 0%) usr 531 kB ( 0%) ggc
cfg cleanup : 0.01 ( 0%) usr 0 kB ( 0%) ggc
df scan insns : 0.03 ( 1%) usr 80 kB ( 0%) ggc
df live regs : 0.01 ( 0%) usr 0 kB ( 0%) ggc
alias analysis : 0.01 ( 0%) usr 64 kB ( 0%) ggc
preprocessing : 0.43 (15%) usr 32064 kB (21%) ggc
parser (global) : 0.08 ( 3%) usr 13045 kB ( 8%) ggc
parser struct body : 0.11 ( 4%) usr 6494 kB ( 4%) ggc
parser function body : 0.06 ( 2%) usr 3361 kB ( 2%) ggc
parser inl. func. body : 0.01 ( 0%) usr 375 kB ( 0%) ggc
parser inl. meth. body : 0.01 ( 0%) usr 849 kB ( 1%) ggc
template instantiation : 0.87 (30%) usr 50372 kB (33%) ggc
inline parameters : 0.00 ( 0%) usr 1057 kB ( 1%) ggc
tree gimplify : 0.04 ( 1%) usr 1444 kB ( 1%) ggc
tree operand scan : 0.00 ( 0%) usr 1083 kB ( 1%) ggc
dominance computation : 0.01 ( 0%) usr 0 kB ( 0%) ggc
out of ssa : 0.01 ( 0%) usr 0 kB ( 0%) ggc
expand : 0.05 ( 2%) usr 1799 kB ( 1%) ggc
post expand cleanups : 0.01 ( 0%) usr 375 kB ( 0%) ggc
integrated RA : 0.10 ( 3%) usr 6610 kB ( 4%) ggc
LRA non-specific : 0.03 ( 1%) usr 0 kB ( 0%) ggc
LRA virtuals elimination: 0.01 ( 0%) usr 176 kB ( 0%) ggc
reload : 0.01 ( 0%) usr 0 kB ( 0%) ggc
thread pro- & epilogue : 0.02 ( 1%) usr 1125 kB ( 1%) ggc
shorten branches : 0.01 ( 0%) usr 0 kB ( 0%) ggc
final : 0.18 ( 6%) usr 1331 kB ( 1%) ggc
symout : 0.62 (21%) usr 26836 kB (17%) ggc
rest of compilation : 0.04 ( 1%) usr 1388 kB ( 1%) ggc
unaccounted todo : 0.01 ( 0%) usr 0 kB ( 0%) ggc
TOTAL : 2.90 153962 kB
#define BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#define FUSION_MAX_MAP_SIZE 50
#define FUSION_MAX_VECTOR_SIZE 50
#include <boost/fusion/container/map.hpp>
#include <boost/mpl/size_t.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <string>
#define MAKE_MAP_ELEMENT(Z, N, D) boost::fusion::pair<boost::mpl::size_t<N>, D>
int main()
{
boost::fusion::map<
BOOST_PP_ENUM(50, MAKE_MAP_ELEMENT, std::string)
> _map;
std::string& elem = boost::fusion::at<boost::mpl::size_t<25> >(_map).second;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment