> On Oct 2, 2016, at 5:14 PM, Mike Ferenduros via swift-users
> <swift-users@swift.org> wrote:
>
> Personally I would be surprised if the malloc caused an actual measurable
> performance hit tbh.
It won’t be noticeable against a call to SecRandom, as noted, but there are
other circumstances where it’s a big performance hit to put a temporary buffer
on the heap. (Right now I’m working on some rather performance-sensitive
database code in C++ where avoiding a few heap allocations per iteration has
proven to be a big win.)
Does Swift have any solution for allocating stack-based array buffers?
—Jens
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users