Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108339

Use DFSAs to handle number conversion in QLocale

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.5
    • Core: Locales (i18n)
    • None
    • All

    Description

      During current work, rearranging the way QLocale converts localized numbers to C-locale ones, mmutz has pointed out that the matching of locale-specific tokens could be better handled by deterministic finite-state automata (DFSA) whose data we could (at least for CLDR-derived locales) generate at the same time that we generate the rest of the locale data.

      Most likely there shall be many locales sharing the same DFSA, so we would probably have another data table, that's an array of DFSA configs, that the individual QLocaleData instances would reference by index. We can leave one spare entry in that table, at the end, for the system locale's run-time compiled DFSA config to be saved in, with systemLocaleData referencing that one by index likewise.

      This has a decent chance of producing some performance improvements. The same current work alluded to above includes (in earlier commits on the branch) the addition of new benchmarks that could be used to evaluate whether the performances does actually improve.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              cnn Qt Core & Network
              Eddy Edward Welbourne
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes