Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and optimize composeChar #33

Closed
wants to merge 4 commits into from
Closed

Commits on May 7, 2020

  1. optimize composeChar

    * unfold the non-decomposable case outside the recursive loop
    * use SPEC constr on encode
    harendra-kumar committed May 7, 2020
    Configuration menu
    Copy the full SHA
    2e9f0b8 View commit details
    Browse the repository at this point in the history
  2. refactor to reduce the number of cases in composeState

    There was a lot of code bloat earlier, the core size reduced from 50K lines
    to 20K lines.
    harendra-kumar committed May 7, 2020
    Configuration menu
    Copy the full SHA
    ade41dc View commit details
    Browse the repository at this point in the history
  3. invert the checking of state and char type

    In composeChar:
    
    * First check the state and then make decisions based on the char type instead
      of doing the opposite. This simplifies the code, the core size reduces by
      1/3rd (it is still huge).
    
    * With this change the code is better amenable to spec-constr
      optimization, with -fspec-constr-count=8 it is able to produce a
      tighter loop improving performance by several times (best improvement is in
      English benchmark).
    harendra-kumar committed May 7, 2020
    Configuration menu
    Copy the full SHA
    d646d35 View commit details
    Browse the repository at this point in the history
  4. Add bang on constr, remove UNPACKs, add a comment

    UNPACK pragmas are redundant as we use a blanket -funbox-strict-fields
    harendra-kumar committed May 7, 2020
    Configuration menu
    Copy the full SHA
    500a144 View commit details
    Browse the repository at this point in the history