Closed yonaskolb closed 6 years ago
Comments addressed and changelog entry added
Would you mind adding the Swift 4 Lexer.swift
changes to this PR?
It seems we're going to need to do some more testing, to compare #225 and #226, maybe even add some sort of test to keep track of the performance (so it doesn't tank again), and it's easier if that PR doesn't also have changes related to the Swift migration.
I'd rather leave Lexer.swift
alone. To fix the warnings means redoing the substring accessing anyway. I'd rather not cause conflicts in the other performance PRs.
Causing conflicts shouldn't be an issue TBH, the PRs will need a rebase anyway. I just thought that a minimal changeset for the old and new performance PRs might help us test why there's a difference.
I just timed this with my tests. It looks like the last commit took it from 0.48
to 1.07
...
Could it be the String(
initializers? We may want to try to keep using SubString
s, as it avoids re-allocation/copy operations.
I tried to keep things as substrings, but things like hasPrefix
weren't available on linux
And if we define our own functions specifically for Linux?
Note: We should move this discussion to #226.
This updates the codebase to Swift 4.1 and drops Swift 3 support
Warnings were not cleaned up in
Lexer.swift
as https://github.com/stencilproject/Stencil/pull/226 will take care of that