Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "copy-constructor" to prevent (incorrect) convert call when type …
…is the same (#36) Before this change: ``` julia> x = f = FixedDecimal{Int128,2}(3.25) >> FixedDecimal{Int128,2}(3.25) julia> @Btime x = FixedDecimal{Int128, 2}($f) 7.272 μs (159 allocations: 2.73 KiB) >> FixedDecimal{Int128,2}(3.25) ``` After this change: ``` julia> x = f = FixedDecimal{Int128,2}(3.25) >> FixedDecimal{Int128,2}(3.25) julia> @Btime x = FixedDecimal{Int128, 2}($f) 1.508 ns (0 allocations: 0 bytes) >> FixedDecimal{Int128,2}(3.25) ```
- Loading branch information