2 ms·
For that matter, his numpy code, which wasn't described until the comments, was terrible. Unlike all the other versions, it included a complete reallocation, co
by cge 12y ago
For that matter, his numpy code, which wasn't described until the comments, was terrible. Unlike all the other versions, it included a complete reallocation, conversion and copying step, which accounted for almost the entire processing time.
People in the comments who tried a reasonable numpy version found it to be around the same speed as the unoptimized C version.