Skip to content

Commit 927ce15

Browse files
authored
Change an array to a tuple to improve parsing performance by 10x (#62)
1 parent f56682c commit 927ce15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FixedPointDecimals.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ Raises an `InexactError` if any rounding is necessary.
402402
const RoundThrows = RoundingMode{:Throw}()
403403

404404
function Base.parse(::Type{FD{T, f}}, str::AbstractString, mode::RoundingMode=RoundNearest) where {T, f}
405-
if !(mode in [RoundThrows, RoundNearest, RoundToZero])
405+
if !(mode in (RoundThrows, RoundNearest, RoundToZero))
406406
throw(ArgumentError("Unhandled rounding mode $mode"))
407407
end
408408

0 commit comments

Comments
 (0)