Page MenuHomePhabricator

vitaut (Victor Zverovich)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 25 2018, 10:28 AM (211 w, 6 d)

Recent Activity

Sat, Jul 30

vitaut added a comment to D129964: [libc++][format] Improve format buffer..

Next I want to look at the std::back_inserter<std::string>.

Sat, Jul 30, 7:34 AM · Restricted Project, Restricted Project

Fri, Jul 29

vitaut added a comment to D130649: [libc++][format] Allows width arg-id with value 0..

I'm actually surprised how fast this issue went through LWG :-)

Fri, Jul 29, 10:41 AM · Restricted Project, Restricted Project

Wed, Jul 27

vitaut added a comment to D130649: [libc++][format] Allows width arg-id with value 0..

One check less, yay!

Wed, Jul 27, 2:47 PM · Restricted Project, Restricted Project
vitaut added a comment to D129964: [libc++][format] Improve format buffer..

Nice improvement but I'd still recommend exploring direct writes to contiguous containers as discussed on the other diff.

Wed, Jul 27, 2:42 PM · Restricted Project, Restricted Project

Jul 16 2022

vitaut added inline comments to D128577: [libc++][chrono] Implements formatter day..
Jul 16 2022, 8:11 AM · Restricted Project, Restricted Project

Jul 10 2022

vitaut added inline comments to D126971: [libc++] Implements Unicode grapheme clustering.
Jul 10 2022, 9:51 AM · Restricted Project, Restricted Project
vitaut added a comment to D129426: [libc++][format] Improves parsing speed..

Nice improvement! It would be good to clarify in the standard that omitting parse is allowed for user-defined types. Could you open an LWG issue?

Jul 10 2022, 9:24 AM · Restricted Project, Restricted Project
vitaut added inline comments to D126971: [libc++] Implements Unicode grapheme clustering.
Jul 10 2022, 9:00 AM · Restricted Project, Restricted Project

Jul 9 2022

vitaut requested changes to D126971: [libc++] Implements Unicode grapheme clustering.

Mostly looks good but at least one output doesn't look right which suggests an error in width estimation. Also a few nits inline.

Jul 9 2022, 8:30 AM · Restricted Project, Restricted Project

Jun 25 2022

vitaut added inline comments to D127570: [libc++][format] Use forwarding references..
Jun 25 2022, 7:06 AM · Restricted Project, Restricted Project

Jun 19 2022

vitaut accepted D127767: [libc++][format] Improves the handle test..

LGTM

Jun 19 2022, 8:03 AM · Restricted Project, Restricted Project

Jun 12 2022

vitaut added inline comments to D121530: [libc++][format] Implement format-string..
Jun 12 2022, 9:26 AM · Restricted Project, Restricted Project

Jun 8 2022

vitaut added inline comments to D121530: [libc++][format] Implement format-string..
Jun 8 2022, 9:11 AM · Restricted Project, Restricted Project

Jun 6 2022

vitaut added inline comments to D125606: [libc++][format] Improve string formatters.
Jun 6 2022, 11:00 AM · Restricted Project, Restricted Project

Jun 5 2022

vitaut added a comment to D125606: [libc++][format] Improve string formatters.

Looks great! My main suggestion is to rename __parser into something more appropriate (see an inline comment) and possibly separate the actual parsing logic from the parser output.

Jun 5 2022, 8:37 AM · Restricted Project, Restricted Project

Jun 4 2022

vitaut added inline comments to D121530: [libc++][format] Implement format-string..
Jun 4 2022, 11:38 AM · Restricted Project, Restricted Project
vitaut requested changes to D121530: [libc++][format] Implement format-string..

In general looks good but I would strongly recommend not to instantiate all of formatting path just to validate width/precision (see an inline comment).

Jun 4 2022, 8:35 AM · Restricted Project, Restricted Project

May 15 2022

vitaut added a comment to D110499: [libc++][format][5/6] Improve format_to_n..

LGTM, just one minor comment inline.

May 15 2022, 8:59 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
May 15 2022, 8:47 AM · Restricted Project, Restricted Project

May 8 2022

vitaut accepted D121514: [libc++][format] Improve format-arg-store..
May 8 2022, 6:51 AM · Restricted Project, Restricted Project

Apr 22 2022

vitaut added a comment to D121514: [libc++][format] Improve format-arg-store..

LGTM

Apr 22 2022, 10:27 AM · Restricted Project, Restricted Project

Apr 16 2022

vitaut requested changes to D121514: [libc++][format] Improve format-arg-store..

Looks much better, thanks. A few comments inline.

Apr 16 2022, 7:53 AM · Restricted Project, Restricted Project

Apr 11 2022

vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Apr 11 2022, 11:40 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Apr 11 2022, 10:10 AM · Restricted Project, Restricted Project

Apr 8 2022

vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Apr 8 2022, 4:43 PM · Restricted Project, Restricted Project

Apr 1 2022

vitaut added inline comments to D110500: [libc++][format][6/6] Improve vformat..
Apr 1 2022, 3:38 PM · Restricted Project, Restricted Project
vitaut accepted D110500: [libc++][format][6/6] Improve vformat..

LGTM

Apr 1 2022, 3:37 PM · Restricted Project, Restricted Project
vitaut added a comment to D121514: [libc++][format] Improve format-arg-store..

Can you explain why you dislike this approach?

Apr 1 2022, 7:21 AM · Restricted Project, Restricted Project

Mar 27 2022

vitaut added inline comments to D120921: [libc++][format] Adds a formattable concept..
Mar 27 2022, 9:09 AM · Restricted Project, Restricted Project
vitaut added a comment to D121514: [libc++][format] Improve format-arg-store..

You could do much better by having a single array and storing the type alternatives for the common case of small(ish) number of arguments in an integer. This is essentially what {fmt} does. I think the current implementation is based on Microsoft's which I'd strongly discourage.

Mar 27 2022, 8:46 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Mar 27 2022, 7:47 AM · Restricted Project, Restricted Project
vitaut added inline comments to D121138: [libc++][format] Adds formatter<charT[N], charT>..
Mar 27 2022, 7:41 AM · Restricted Project, Restricted Project
vitaut added inline comments to D120921: [libc++][format] Adds a formattable concept..
Mar 27 2022, 7:21 AM · Restricted Project, Restricted Project

Mar 9 2022

vitaut added inline comments to D121138: [libc++][format] Adds formatter<charT[N], charT>..
Mar 9 2022, 11:50 AM · Restricted Project, Restricted Project

Jan 24 2022

vitaut added a comment to D115999: [libc++][format] Finish P0645 Text Formatting..

Great work, @Mordante! Can't wait to use more of std::format on gobolt.

Jan 24 2022, 1:00 PM · Restricted Project

Jan 23 2022

vitaut accepted D114001: [libc++][format] Adds formatter floating-point..

LGTM

Jan 23 2022, 6:42 AM · Restricted Project

Jan 17 2022

vitaut added inline comments to D114001: [libc++][format] Adds formatter floating-point..
Jan 17 2022, 12:30 PM · Restricted Project

Jan 16 2022

vitaut accepted D110497: [libc++][format][3/6] Adds a __container_buffer..

Same as D110495:

Jan 16 2022, 9:13 AM · Restricted Project, Restricted Project
vitaut accepted D110495: [libc++][format][2/6] Adds a __output_iterator..

As commented, I'm very skeptical about this approach because it has extra buffering for common cases but I defer to libc++ maintainers the decision whether they want to land this as is or optimize buffering now.

Jan 16 2022, 9:06 AM · Restricted Project, Restricted Project
vitaut added a comment to D114001: [libc++][format] Adds formatter floating-point..

Overall looks good, just a bunch of minor(ish) comments inline.

Jan 16 2022, 9:00 AM · Restricted Project

Jan 12 2022

vitaut added inline comments to D114001: [libc++][format] Adds formatter floating-point..
Jan 12 2022, 10:13 AM · Restricted Project

Jan 1 2022

vitaut added inline comments to D114001: [libc++][format] Adds formatter floating-point..
Jan 1 2022, 8:01 AM · Restricted Project

Dec 24 2021

vitaut added a comment to D114001: [libc++][format] Adds formatter floating-point..

As commented inline, to_chars is not a great API for implementing this because you have to do extra work to reparse the output. But it's probably OK for the initial implementation.

Dec 24 2021, 8:59 AM · Restricted Project

Dec 23 2021

vitaut added a comment to D115991: [libc++][format] Adds formatter handle..

LGTM

Dec 23 2021, 11:45 AM · Restricted Project
vitaut accepted D115988: [libc++][format] Adds formatter pointer..

LGTM

Dec 23 2021, 10:50 AM · Restricted Project
vitaut added inline comments to D115988: [libc++][format] Adds formatter pointer..
Dec 23 2021, 9:12 AM · Restricted Project

Dec 22 2021

vitaut requested changes to D115988: [libc++][format] Adds formatter pointer..

Overall looks good but I think there is a potential buffer overflow in format (see inline comment).

Dec 22 2021, 3:54 PM · Restricted Project

Dec 19 2021

vitaut added a comment to D115999: [libc++][format] Finish P0645 Text Formatting..

But I consider that an issue in to_chars and not in <format>.

Dec 19 2021, 4:23 PM · Restricted Project
vitaut added a comment to D115999: [libc++][format] Finish P0645 Text Formatting..

All parts of the paper have been implemented

Dec 19 2021, 9:01 AM · Restricted Project
vitaut added inline comments to D115989: [libc++][format] Disable default formatter..
Dec 19 2021, 8:55 AM · Restricted Project
vitaut added inline comments to D115991: [libc++][format] Adds formatter handle..
Dec 19 2021, 8:53 AM · Restricted Project

Dec 18 2021

vitaut added a comment to D115989: [libc++][format] Disable default formatter..

LGTM

Dec 18 2021, 9:17 AM · Restricted Project

Nov 26 2021

vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Nov 26 2021, 8:13 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110495: [libc++][format][2/6] Adds a __output_iterator..
Nov 26 2021, 7:59 AM · Restricted Project, Restricted Project

Nov 25 2021

vitaut added inline comments to D110499: [libc++][format][5/6] Improve format_to_n..
Nov 25 2021, 8:33 AM · Restricted Project, Restricted Project
vitaut added a comment to D110498: [libc++][format][4/6] Improve formatted_size..

In general looks good, just a few minor comments inline. However, the discussion in earlier diffs may affect __formatted_size_buffer API.

Nov 25 2021, 8:26 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110495: [libc++][format][2/6] Adds a __output_iterator..
Nov 25 2021, 8:11 AM · Restricted Project, Restricted Project
vitaut added inline comments to D112361: [libc++][format] Buffer changes proof-of-concept.
Nov 25 2021, 8:05 AM · Restricted Project, Restricted Project

Nov 24 2021

vitaut added inline comments to D112361: [libc++][format] Buffer changes proof-of-concept.
Nov 24 2021, 12:11 PM · Restricted Project, Restricted Project

Nov 21 2021

vitaut added inline comments to D110494: [libc++][format][1/6] Reduce binary size..
Nov 21 2021, 9:10 AM · Restricted Project
vitaut added a comment to D110494: [libc++][format][1/6] Reduce binary size..

LGTM provided that the extra copy and buffering is eliminated in the follow-up diffs. Not directly related to this diff but I recommend doing something about the default codegen (see the inline comment).

Nov 21 2021, 9:03 AM · Restricted Project
vitaut added inline comments to D110494: [libc++][format][1/6] Reduce binary size..
Nov 21 2021, 8:54 AM · Restricted Project

Nov 17 2021

vitaut added inline comments to D112361: [libc++][format] Buffer changes proof-of-concept.
Nov 17 2021, 4:45 PM · Restricted Project, Restricted Project

Nov 12 2021

vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Nov 12 2021, 8:50 AM · Restricted Project

Nov 11 2021

vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Nov 11 2021, 2:57 PM · Restricted Project
vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Nov 11 2021, 11:44 AM · Restricted Project
vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Nov 11 2021, 11:26 AM · Restricted Project

Nov 10 2021

vitaut added inline comments to D113137: [libc++] Fix lifetime issues of temporaries..
Nov 10 2021, 2:43 PM · Restricted Project

Nov 7 2021

vitaut added inline comments to D112361: [libc++][format] Buffer changes proof-of-concept.
Nov 7 2021, 8:04 AM · Restricted Project, Restricted Project
vitaut added inline comments to D112361: [libc++][format] Buffer changes proof-of-concept.
Nov 7 2021, 7:11 AM · Restricted Project, Restricted Project

Oct 31 2021

vitaut added inline comments to D110497: [libc++][format][3/6] Adds a __container_buffer..
Oct 31 2021, 9:25 AM · Restricted Project, Restricted Project
vitaut requested changes to D110497: [libc++][format][3/6] Adds a __container_buffer..

Character-by-character output, especially type erased one introduced in D110494 doesn't seem efficient. As commented on the the previous diff the buffer and corresponding output iterator should provide access to a contiguous buffer and type erase the reallocation, not character output.

Oct 31 2021, 7:03 AM · Restricted Project, Restricted Project
vitaut added a comment to D110497: [libc++][format][3/6] Adds a __container_buffer..

Since there's no guarantee every container's insert behaves properly

Oct 31 2021, 6:50 AM · Restricted Project, Restricted Project

Oct 24 2021

vitaut added a comment to D110495: [libc++][format][2/6] Adds a __output_iterator..

I've created a proof-of-concept here with benchmark results D112361.
That revision is just to show what I did. It's intended to be a basis for the changes, it *is not* to be used as-is.

Oct 24 2021, 9:46 AM · Restricted Project, Restricted Project

Oct 19 2021

vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Oct 19 2021, 12:32 PM · Restricted Project

Oct 18 2021

vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Oct 18 2021, 5:09 PM · Restricted Project
vitaut added inline comments to D112017: [libcxx][format] Fix how we handle char traits in formatter<string> and formatter<string_view>.
Oct 18 2021, 10:49 AM · Restricted Project

Oct 17 2021

vitaut requested changes to D110495: [libc++][format][2/6] Adds a __output_iterator..

I'm very surprised that this is the solution you went with. Indirect function call to write each character individually will likely be slow in practice compared to a contiguous buffer and a bulk copy. Please post benchmark results.

Oct 17 2021, 7:30 AM · Restricted Project, Restricted Project
vitaut added inline comments to D110494: [libc++][format][1/6] Reduce binary size..
Oct 17 2021, 7:18 AM · Restricted Project
vitaut added a comment to D110494: [libc++][format][1/6] Reduce binary size..

Now that the format context is almost always format_context, it might be worth adding [[clang::preferred_name(format_context)]] to the basic_format_context template.

Oct 17 2021, 7:16 AM · Restricted Project
vitaut added a comment to D110501: [libc++][format] Adds formatting benchmarks..

Minor comment inline, otherwise LGTM.

Oct 17 2021, 6:51 AM · Restricted Project

Sep 5 2021

vitaut added inline comments to D96664: [libc++][format] Implement formatters..
Sep 5 2021, 7:19 AM · Restricted Project

Aug 8 2021

vitaut added a comment to D103466: [libc++][format] Adds char formatter..

LGTM

Aug 8 2021, 8:53 AM · Restricted Project
vitaut added a comment to D103433: [libc++][format] Adds integer formatter..

LGTM

Aug 8 2021, 8:47 AM · Restricted Project

Aug 7 2021

vitaut added a comment to D103670: [libc++][format] Adds bool formatter..

Two minor comments inline, otherwise LGTM.

Aug 7 2021, 12:09 PM · Restricted Project

Jul 28 2021

vitaut added inline comments to D103357: [libc++][format] Add __format_arg_store..
Jul 28 2021, 1:52 PM · Restricted Project
vitaut added inline comments to D103357: [libc++][format] Add __format_arg_store..
Jul 28 2021, 11:36 AM · Restricted Project

Jul 25 2021

vitaut accepted D103433: [libc++][format] Adds integer formatter..

Looks good, thanks for addressing the comments.

Jul 25 2021, 8:27 AM · Restricted Project

Jul 18 2021

vitaut accepted D103413: [libc++][format] Implement Unicode support..

LGTM

Jul 18 2021, 7:21 AM · Restricted Project
vitaut added inline comments to D103670: [libc++][format] Adds bool formatter..
Jul 18 2021, 6:29 AM · Restricted Project
vitaut added inline comments to D103433: [libc++][format] Adds integer formatter..
Jul 18 2021, 6:13 AM · Restricted Project

Jul 17 2021

vitaut added inline comments to D103466: [libc++][format] Adds char formatter..
Jul 17 2021, 9:09 AM · Restricted Project
vitaut added inline comments to D103466: [libc++][format] Adds char formatter..
Jul 17 2021, 8:59 AM · Restricted Project
vitaut requested changes to D103433: [libc++][format] Adds integer formatter..
Jul 17 2021, 8:48 AM · Restricted Project
vitaut accepted D103425: [libc++][format] Adds string formatter..

Some nits inline, otherwise LGTM.

Jul 17 2021, 7:48 AM · Restricted Project
vitaut added inline comments to D103413: [libc++][format] Implement Unicode support..
Jul 17 2021, 7:20 AM · Restricted Project
vitaut added inline comments to D103413: [libc++][format] Implement Unicode support..
Jul 17 2021, 7:17 AM · Restricted Project
vitaut added inline comments to D103368: [libc++][format] Adds parser std-format-spec..
Jul 17 2021, 7:00 AM · Restricted Project
vitaut accepted D103368: [libc++][format] Adds parser std-format-spec..

Looks great, thanks for addressing the comments!

Jul 17 2021, 6:31 AM · Restricted Project
vitaut added inline comments to D103357: [libc++][format] Add __format_arg_store..
Jul 17 2021, 6:28 AM · Restricted Project