3 ms·
If you want some huge symbols, introduce Boost Lambda into a project. Doing a single for_each with a Boost Lambda can introduce symbols of several 100k.
by hermitdev 10y ago
If you want some huge symbols, introduce Boost Lambda into a project. Doing a single for_each with a Boost Lambda can introduce symbols of several 100k.
- jjoonathan 10y agoNice! I'm not near a C++ environment atm, but I promise an upvote to anyone who digs up one of these beasts for us to gawk at!
- jcranmer 10y agoThis is one that I found from running nm on a binary: _ZN5boost6detail7variant15visitation_implIN4mpl_4int_ILi40EEENS1_20visitation_impl_stepINS_3mpl6v_iterINS7_6v_itemI25SelectedEntityChangedDataNS9_IN11InputAction17ServerCommandDataENS9_INSB_18SetupBlueprintDataENS9_INSB_13BuildRailDataENS9_I2IDI20CustomInputPrototypetENS9_IN10ActionData22TrainWaitConditionDataENS9_INSI_18TrainWaitConditionENS9_INSB_22BuildTerrainParametersENS9_I27DeciderCombinatorParametersNS9_I30ArithmeticCombinatorParametersNS9_INSB_18PlayerJoinGameDataENS9_INSB_7CrcDataENS9_INSB_20SetBlueprintIconDataENS9_I20AbilitySpecificationNS9_INSB_17TakeEquipmentDataENS9_INSB_18PlaceEquipmentDataENS9_I6VectorNS9_IdNS9_ISF_I9ItemGrouphENS9_INSB_15MarketOfferDataENS9_ISsNS9_INSI_33BehaviorModeOfOperationParametersENS9_INSI_17TrainScheduleDataENS9_INSB_18GuiTextChangedDataENS9_INSB_14GuiChangedDataENS9_INSB_12GuiClickDataENS9_INSB_20SelectItemParametersENS9_INSI_24LogisticFilterSignalDataENS9_INSI_22LogisticFilterItemDataENS9_ISF_I19TechnologyPrototypetENS9_INSI_10SignalDataENS9_INSI_26CircuitConditionParametersENS9_INSB_19SetFilterParametersENS9_INSB_19BuildItemParametersENS9_INSB_16CancelCraftOrderENS9_INSB_9CraftDataENS9_I13ShootingStateNS9_IhNS9_ItNS9_IjNS9_IbNS9_ISF_I13ItemPrototypetENS9_ISF_I15RecipePrototypetENS9_I28ItemStackTargetSpecificationNS9_I11RidingStateNS9_I9DirectionNS9_INSB_14SelectAreaDataENS9_I12RealPositionNS7_7vector0INS3_2naEEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELi0EEELl40EEENS8_IS32_Ll48EEEEENS1_14invoke_visitorINS1_11get_visitorIKS10_EEEEPKvNS_7variantINS1_13over_sequenceINS7_8vector48IS1N_S1M_S1L_S1K_S1J_S1I_S1G_bjthS1E_S1D_S1C_S1B_S1A_S19_S18_S17_S15_S14_S13_S12_S11_S10_SZ_SY_SsSX_SW_dSU_ST_SS_SR_SQ_SP_SO_SN_SM_SL_SK_SJ_SH_SE_SD_SC_SA_EEEEJEE18has_fallback_type_EEENT1_11result_typeEiiRS3K_T2_NS3_5bool_ILb0EEET3_PT_PT0_ The c++filt output is 13,776 characters, so I can't easily copy it here.
- hermitdev 10y agoWell, my memory was a bit wrong (it's been about 6 years since I last looked at this), and it's not as bad as I remember. It's not great, mind you, but here are the binary sizes for a simple program: Boost Lambda (unstripped): 44176 bytes Boost Lambda (stripped): 18808 bytes C++11 Lambda (unstripped): 24896 bytes C++11 Lambda (stripped): 14712 bytes Test program is pretty simple: #include <algorithm> #include <iostream> #include <vector> #include <boost/lambda/lambda.hpp> using namespace boost::lambda; int main(int, const char**) { std::vector<int> v; for (int i = 0; i < 100; ++i) v.push_back(i); //std::for_each(std::begin(v), std::end(v), std::cout << _1 << constant('\n')); std::for_each(std::begin(v), std::end(v), [](int i) { std::cout << i << '\n'; }); return 0; } I'm using Boost 1.58.0 and GCC 5.4.0 with -std=c++1y flag only to get the numbers above. (edit: formatting)