Skip to content

Is InlineStr worth it? #1040

@ollpu

Description

@ollpu

Out of curiosity, I made the InlineStr constructors panic. Test results:

failures:
    parse::test::footnote_offsets_exclamation
    parse::test::issue_313
    parse::test::issue_319
    strings::test_special_string::cow_char_to_cow_str
    strings::test_special_string::cow_str_to_cow
    strings::test_special_string::cow_str_to_string
    strings::test_special_string::cowstr_char_to_string
    strings::test_special_string::inlinestr_ascii
    strings::test_special_string::inlinestr_fits_twentytwo
    strings::test_special_string::inlinestr_unicode
    strings::test_special_string::small_boxed_str_clones_to_stack

None of the spec tests fail. Out of the stuff in third_party, I think only third_party/markdown-it/inline-entity.md panics (it has numerical &entities;).

I doubt InlineStr is a net negative, but it might not be helping with performance in any practical scenario. We'd need a more diverse corpus of benchmarks to properly evaluate that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions