rust/compiler
bors 35dbef2350 Auto merge of #82562 - llogiq:one-up-82248, r=oli-obk
Optimize counting digits in line numbers during error reporting further

This one-ups #82248 by switching the strategy: Instead of dividing the value by 10 repeatedly, we compare with a limit that we multiply by 10 repeatedly. In my benchmarks, this took between 50% and 25% of the original time. The reasons for being faster are:

1. While LLVM is able to replace a division by constant with a multiply + shift, a plain multiplication is still faster. However, this doesn't even factor, because
2. Multiplication, unlike division, is const. We also use a simple for-loop instead of a more complex loop + break, which allows
3. rustc to const-fold the whole loop, and indeed the assembly output simply shows a series of comparisons.
2021-03-02 21:01:47 +00:00
..
rustc just max_level_info 2020-09-11 09:37:51 -07:00
rustc_apfloat bumped smallvec deps 2021-02-14 18:03:11 +03:00
rustc_arena Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
rustc_ast Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
rustc_ast_lowering Auto merge of #82447 - Amanieu:legacy_const_generics, r=oli-obk 2021-02-25 18:14:50 +00:00
rustc_ast_passes Rollup merge of #82296 - spastorino:pubrules, r=nikomatsakis 2021-02-23 16:10:23 +01:00
rustc_ast_pretty Rollup merge of #82238 - petrochenkov:nocratemod, r=Aaron1011 2021-02-19 02:49:08 +01:00
rustc_attr remove redundant wrapping of return types of allow_internal_unstable() and rustc_allow_const_fn_unstable() 2021-02-21 18:11:27 +01:00
rustc_builtin_macros Remove some P-s 2021-02-20 10:51:26 +01:00
rustc_codegen_cranelift Rollup merge of #81940 - jhpratt:stabilize-str_split_once, r=m-ou-se 2021-02-26 15:52:29 +01:00
rustc_codegen_llvm Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obk 2021-02-27 21:56:20 +01:00
rustc_codegen_ssa Rollup merge of #82535 - wesleywiser:wip_codegen_thread_names, r=nagisa 2021-02-26 15:52:35 +01:00
rustc_data_structures Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obk 2021-02-27 21:56:20 +01:00
rustc_driver Rollup merge of #82269 - LeSeulArtichaut:cleanup-ppmode, r=spastorino 2021-02-25 16:06:16 -05:00
rustc_error_codes Rollup merge of #82516 - PoignardAzur:inherent-impl-ty, r=oli-obk 2021-03-02 21:23:15 +09:00
rustc_errors Even faster counting of digits for error line numbers 2021-02-27 15:28:58 +01:00
rustc_expand Combine HasAttrs and HasTokens into AstLike 2021-02-27 00:14:13 -05:00
rustc_feature Rollup merge of #82516 - PoignardAzur:inherent-impl-ty, r=oli-obk 2021-03-02 21:23:15 +09:00
rustc_fs_util Optimize away a `fs::metadata` call. 2021-01-06 08:33:15 -08:00
rustc_graphviz remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
rustc_hir Miscellaneous inlining improvements 2021-02-26 00:00:00 +00:00
rustc_hir_pretty Auto merge of #81611 - cjgillot:meowner, r=estebank 2021-02-16 22:14:32 +00:00
rustc_incremental Print -Ztime-passes (and misc stats/logs) on stderr, not stdout. 2021-02-18 14:13:38 +02:00
rustc_index Miscellaneous inlining improvements 2021-02-26 00:00:00 +00:00
rustc_infer Rollup merge of #82635 - pierwill:edit-infer, r=oli-obk 2021-03-01 11:25:10 -05:00
rustc_interface Use optional values for inlining thresholds 2021-02-27 10:19:19 +01:00
rustc_lexer Return EOF_CHAR constant instead of magic char. 2021-01-07 13:20:04 +01:00
rustc_lint Rollup merge of #82620 - jyn514:apply-renamed-lints, r=Manishearth 2021-03-01 11:25:08 -05:00
rustc_lint_defs Enable report_in_external_macro in unaligned_references 2021-02-27 21:25:06 +09:00
rustc_llvm HWASan support 2021-02-07 23:48:58 -08:00
rustc_macros replaced some map_or with map_or_else 2021-02-24 02:43:35 +03:00
rustc_metadata Add #[rustc_legacy_const_generics] 2021-02-23 17:25:55 +00:00
rustc_middle Rollup merge of #82537 - wesleywiser:update_measureme, r=oli-obk 2021-02-27 21:56:20 +01:00
rustc_mir Rollup merge of #82376 - tmiasko:inline-options, r=oli-obk 2021-03-02 21:23:14 +09:00
rustc_mir_build Auto merge of #81978 - tmiasko:head-ctor, r=Mark-Simulacrum 2021-02-22 21:45:50 +00:00
rustc_parse Rollup merge of #82579 - osa1:issue82566, r=estebank 2021-03-02 21:23:17 +09:00
rustc_parse_format parse_format: treat r" as a literal 2021-02-06 15:01:07 +00:00
rustc_passes Rollup merge of #82662 - GuillaumeGomez:doc-attr-check, r=jyn514 2021-03-02 00:50:10 +01:00
rustc_plugin_impl Only store a LocalDefId in hir::Item. 2021-02-15 19:32:10 +01:00
rustc_privacy Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726 2021-02-18 16:57:34 +01:00
rustc_query_impl Simplify hashing. 2021-02-21 12:22:22 +01:00
rustc_query_system Simplify hashing. 2021-02-21 12:22:22 +01:00
rustc_resolve Rollup merge of #82456 - klensy:or-else, r=estebank 2021-02-26 15:52:31 +01:00
rustc_save_analysis Only store a LocalDefId in hir::ForeignItem. 2021-02-15 19:32:29 +01:00
rustc_serialize Update the bootstrap compiler 2021-02-20 17:19:30 -05:00
rustc_session Rollup merge of #82376 - tmiasko:inline-options, r=oli-obk 2021-03-02 21:23:14 +09:00
rustc_span Rollup merge of #82516 - PoignardAzur:inherent-impl-ty, r=oli-obk 2021-03-02 21:23:15 +09:00
rustc_symbol_mangling Use less HirId when referring to items. 2021-02-15 19:36:12 +01:00
rustc_target Change default Solaris x86 target to x86_64-pc-solaris 2021-03-01 15:05:31 +01:00
rustc_trait_selection Auto merge of #82698 - JohnTitor:rollup-htd533c, r=JohnTitor 2021-03-02 12:57:06 +00:00
rustc_traits Rollup merge of #82066 - matthewjasper:trait-ref-fix, r=jackh726 2021-02-18 16:57:34 +01:00
rustc_ty_utils Auto merge of #82159 - BoxyUwU:uwu, r=varkor 2021-02-24 21:54:52 +00:00
rustc_type_ir New pass to deduplicate blocks 2021-02-21 21:51:54 +01:00
rustc_typeck Rollup merge of #82627 - JohnTitor:issue-82612, r=estebank 2021-03-02 21:23:20 +09:00