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

Use Parser::skip_whitespace in a few places to make Parser::try rewind less #18171

Merged
merged 1 commit into from Aug 26, 2017

Commits on Aug 25, 2017

  1. Use Parser::skip_whitespace in a few places to make Parser::try rewin…

    …d less.
    
    Gecko’s CSS parsing microbenchmarks before:
    
    ```
      43.437 ±  0.391 ms    Stylo.Servo_StyleSheet_FromUTF8Bytes_Bench
      29.244 ±  0.042 ms    Stylo.Gecko_nsCSSParser_ParseSheet_Bench
     281.884 ±  0.028 ms    Stylo.Servo_DeclarationBlock_SetPropertyById_Bench
     426.242 ±  0.008 ms    Stylo.Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_Bench
    ```
    
    After:
    
    ```
      29.779 ±  0.254 ms    Stylo.Servo_StyleSheet_FromUTF8Bytes_Bench
      28.841 ±  0.031 ms    Stylo.Gecko_nsCSSParser_ParseSheet_Bench
     296.240 ±  4.744 ms    Stylo.Servo_DeclarationBlock_SetPropertyById_Bench
     293.855 ±  4.304 ms    Stylo.Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_Bench
    ```
    SimonSapin committed Aug 25, 2017
You can’t perform that action at this time.