This is probably the infamous bug of the performance penalty of closures, related to @threads creating a closure.
@threads
See: Type-instability because of @threads boxing variables