La bibliothèque boost est LA bibliothèque du C++ (après la bibliothèque standard, bien entendu!), bourrée d'utilitaires utiles pour fournir une base solide à son développement. Utilisée dans nombre de projets C++, un reproche fréquent est que la bestiole prend de l'embonpoint, et que ses en-têtes à ralonge plombent rapidement les temps de compilation d'un projet.
J'ai donc écrit un petit script bash qui me compile chaque en-tête l'une après l'autre et me renvoie le temps qu'il a fallu pour compiler. J'utilise g++ 4.9.2, en mode C++11 et avec l'option d'optimisation -O3. Me voilà avec la liste complète des en-têtes les plus couteuses parmi celles disponibles directement sous le répertoire "boost" et "boost/algorithm". Pas vraiment de surprises, mais la confirmation qu'il faut faire un peu attention à ses inclusions.
5.41 | boost/geometry.hpp |
4.73 | boost/phoenix.hpp |
3.86 | boost/wave.hpp |
3.77 | boost/thread.hpp |
3.24 | boost/random.hpp |
2.92 | boost/signals2.hpp |
2.68 | boost/algorithm/string_regex.hpp |
2.65 | boost/date_time.hpp |
2.57 | boost/program_options.hpp |
2.24 | boost/bimap.hpp |
2.21 | boost/flyweight.hpp |
2.18 | boost/algorithm/string.hpp |
2.15 | boost/algorithm/hex.hpp |
2.05 | boost/exception_ptr.hpp |
1.99 | boost/local_function.hpp |
1.86 | boost/lexical_cast.hpp |
1.85 | boost/asio.hpp |
1.81 | boost/multi_array.hpp |
1.71 | boost/locale.hpp |
1.68 | boost/multi_index_container.hpp |
1.68 | boost/assign.hpp |
1.61 | boost/variant.hpp |
1.59 | boost/regex.hpp |
1.50 | boost/unordered_map.hpp |
1.48 | boost/chrono.hpp |
1.46 | boost/circular_buffer.hpp |
1.45 | boost/unordered_set.hpp |
1.45 | boost/scope_exit.hpp |
1.45 | boost/function.hpp |
1.45 | boost/filesystem.hpp |
1.41 | boost/format.hpp |
1.39 | boost/range.hpp |
1.26 | boost/make_shared.hpp |
1.24 | boost/optional.hpp |
1.22 | boost/smart_ptr.hpp |
1.16 | boost/shared_container_iterator.hpp |
1.10 | boost/tokenizer.hpp |
1.08 | boost/token_iterator.hpp |
1.08 | boost/algorithm/gather.hpp |
1.02 | boost/dynamic_bitset.hpp |
1.01 | boost/weak_ptr.hpp |
1.00 | boost/shared_ptr.hpp |
1.00 | boost/enable_shared_from_this.hpp |
0.99 | boost/shared_array.hpp |
0.88 | boost/array.hpp |
0.84 | boost/compressed_pair.hpp |
0.82 | boost/any.hpp |
0.80 | boost/algorithm/minmax.hpp |
0.79 | boost/swap.hpp |
0.68 | boost/type_traits.hpp |
0.60 | boost/parameter.hpp |
0.58 | boost/multi_index_container_fwd.hpp |
0.58 | boost/concept_check.hpp |
0.45 | boost/cast.hpp |
0.43 | boost/foreach.hpp |
0.41 | boost/iterator_adaptors.hpp |
0.41 | boost/generator_iterator.hpp |
0.38 | boost/ratio.hpp |
0.35 | boost/scoped_ptr.hpp |
0.35 | boost/rational.hpp |
0.35 | boost/concept_archetype.hpp |
0.35 | boost/algorithm/clamp.hpp |
0.33 | boost/bind.hpp |
0.32 | boost/progress.hpp |
0.32 | boost/intrusive_ptr.hpp |
0.31 | boost/circular_buffer_fwd.hpp |
0.29 | boost/aligned_storage.hpp |
0.28 | boost/utility.hpp |
0.28 | boost/pointee.hpp |
0.28 | boost/mem_fn.hpp |
0.28 | boost/indirect_reference.hpp |
0.27 | boost/operators.hpp |
0.27 | boost/functional.hpp |
0.26 | boost/strong_typedef.hpp |
0.26 | boost/scoped_array.hpp |
0.26 | boost/get_pointer.hpp |
0.25 | boost/iterator.hpp |
0.25 | boost/dynamic_bitset_fwd.hpp |
0.24 | boost/next_prior.hpp |
0.24 | boost/function_output_iterator.hpp |
0.24 | boost/assert.hpp |
0.22 | boost/cregex.hpp |
0.15 | boost/nondet_random.hpp |
0.10 | boost/blank.hpp |
0.08 | boost/crc.hpp |
0.08 | boost/call_traits.hpp |
0.08 | boost/atomic.hpp |
0.07 | boost/integer_traits.hpp |
0.07 | boost/integer.hpp |
0.06 | boost/timer.hpp |
0.06 | boost/regex_fwd.hpp |
0.06 | boost/limits.hpp |
0.06 | boost/integer_fwd.hpp |
0.06 | boost/implicit_cast.hpp |
0.05 | boost/throw_exception.hpp |
0.05 | boost/ref.hpp |
0.05 | boost/last_value.hpp |
0.04 | boost/visit_each.hpp |
0.04 | boost/static_assert.hpp |
0.04 | boost/preprocessor.hpp |
0.04 | boost/noncopyable.hpp |
0.04 | boost/math_fwd.hpp |
0.04 | boost/cstdint.hpp |
0.04 | boost/config.hpp |
0.02 | boost/io_fwd.hpp |
0.02 | boost/cstdlib.hpp |
0.02 | boost/algorithm/minmax_element.hpp |
0.01 | boost/version.hpp |
0.01 | boost/type.hpp |
0.01 | boost/pointer_cast.hpp |
0.01 | boost/non_type.hpp |
0.01 | boost/none_t.hpp |
0.01 | boost/none.hpp |
0.01 | boost/memory_order.hpp |
0.01 | boost/is_placeholder.hpp |
0.01 | boost/current_function.hpp |
0.01 | boost/checked_delete.hpp |
0.01 | boost/cerrno.hpp |
0.01 | boost/blank_fwd.hpp |
0.00 | boost/pointer_to_other.hpp |
0.00 | boost/function_equal.hpp |
0.00 | boost/foreach_fwd.hpp |
Aucun commentaire:
Enregistrer un commentaire