-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
TimeZones build performance regression #17072
Comments
I think this was fixed by #17052. In 0.5 you need to use index 68af73e..97ee976 100644
--- a/src/timezones/Olson.jl
+++ b/src/timezones/Olson.jl
@@ -166,17 +166,17 @@ function ruleparse(from, to, rule_type, month, on, at, sav
# The first day of the week that occurs before or after a given day of
# i.e. Sun>=8 refers to the Sunday after the 8th of the month
# or in other words, the 2nd Sunday.
- dow = DAYS[match(r"\w\w\w", on).match]
- dom = parse(Int, match(r"\d\d?", on).match)
+ dow::Int = DAYS[match(r"\w\w\w", on).match]
+ dom::Int = parse(Int, match(r"\d\d?", on).match)
if ismatch(r"<=", on)
- on_func = @eval (dt -> day(dt) <= $dom && dayofweek(dt) == $dow)
+ on_func = (dt -> day(dt) <= dom && dayofweek(dt) == dow)
else
- on_func = @eval (dt -> day(dt) >= $dom && dayofweek(dt) == $dow)
+ on_func = (dt -> day(dt) >= dom && dayofweek(dt) == dow)
end
elseif ismatch(r"\d\d?", on)
# Matches just a plain old day of the month
dom = parse(Int, on)
- on_func = @eval (dt -> day(dt) == $dom)
+ on_func = dt -> day(dt) == dom
else
error("Can't parse day of month for DST change")
end After that, the time is --- wait for it --- 0.756 seconds. |
Excellent! It's definitely fixed on |
On 0.4:
On 0.5:
Unfortunately I cannot seem to run a
@profile
(Julia hangs and can't be SIGINTd) in either version of Julia on this call. I seem to remember the regression being related to codegen/inference when running profiles previously.This is the same version of the code (
master
) but this has been the case for previous versions.The text was updated successfully, but these errors were encountered: