Re: [swift-users] Why are Swift Loops slow?

2016-10-12 Thread Gerriet M. Denkmann via swift-users
> On 12 Oct 2016, at 23:05, Joe Groff via swift-users > wrote: > >> >> On Oct 12, 2016, at 2:25 AM, Gerriet M. Denkmann via swift-users >> wrote: >> >> uint64_t nbrBytes = 4e8; >> uint64_t count = 0; >> for( uint64_t byteIndex = 0; byteIndex <

Re: [swift-users] Why are Swift Loops slow?

2016-10-12 Thread Joe Groff via swift-users
> On Oct 12, 2016, at 2:25 AM, Gerriet M. Denkmann via swift-users > wrote: > > uint64_t nbrBytes = 4e8; > uint64_t count = 0; > for( uint64_t byteIndex = 0; byteIndex < nbrBytes; byteIndex++ ) > { > count += byteIndex; > if ( ( byteIndex & 0x ) == 0

[swift-users] Why are Swift Loops slow?

2016-10-12 Thread Gerriet M. Denkmann via swift-users
uint64_t nbrBytes = 4e8; uint64_t count = 0; for( uint64_t byteIndex = 0; byteIndex < nbrBytes; byteIndex++ ) { count += byteIndex; if ( ( byteIndex & 0x ) == 0 ) { count += 1.3; } (AAA) }; Takes 260 msec. Btw.: Without the (AAA) line the whole loop is done in 10 μsec.