nulls are tracked internally in kdb+ ?

Hello gentlemen, 

q)zz:1000000000?1000.0

q)\t sum zz

414

q)zz[750000000]:44.f

q)\t sum zz

413

q)\t zz[999000000]:0Nf

0

q)\t sum zz

940

q)\t zz[999000000]:33.0f

0

q)\t sum zz

417

q)\t zz[1000000]:0Nf

0

q)\t sum zz

924

How could that be? What is internal implementation? Does it track count of nulls within array and selects different sum implementations?

Cheers,

San.

yes, it chooses another path if it becomes aware of a null.

My question was: how exactly this is implemented? When does it become aware? 

Attached benchmarks show it’s not becoming aware because “encountered null while in the loop”, because position of null in array does not affect time.

Any lights on that?

https://www.programiz.com/c-programming/c-for-loop

Thanks, but my question was about how nulls are detected, to choose different paths.

If they are detected inside loop, that would affect total time depending of the location of null (close to beginning or end of array) but obviously it does not affect total time (see my initial post).