« first day (267 days earlier)      last day (1268 days later) » 

2:54 AM
Can anyone beat this wc? solarpunk.systems/#k-notes
 
 
10 hours later…
ngn
12:43 PM
@chrispsn i got a very different timing for the original wc - only 8.3s instead of 28s, and for k7 (the latest) i got 4.7s instead of 4s
hm... with ngn/k i get 2.979s for \t:100 ."\\wc big.txt"
unfortunately i can't run the same k function as it uses in, but mine would probably be slower there
slightly lower timing for wc - 2.928s if i eliminate the shell overhead by using my custom way to fork: \t:100 `x(("/usr/bin/wc";"big.txt");"")
 
1:01 PM
@ngn probably my vm acting up re: native wc timing - yours is in line (magnitude) with attila's
 
ngn
@chrispsn i think i have a better version (in k7) than wcfast
f:{x:" \n\t\r"?x;(+/x=1;+/0>':x<4;#x)}
4705ms vs 4250ms on my laptop
3801ms - f:{x:" \n\t\r"?x;(+/x=1;+/<':x=4;#x)}
golfed :) f:+/'(1=;<':4=;#:)@\:" \n\t\r"?
 
 
6 hours later…
7:23 PM
@ngn nice!!!
 
7:42 PM
What makes it faster in your view? Working with ints is faster than working with chars?
 
8:04 PM
Ungolfed (3801ms version) is very slightly faster than golfed on my machine
 
8:42 PM
whenever x=4 it is not one of " \n\t\r"
is there a case where +/<':x=4 is different from +/~x=4 ?
there must be
two spaces for instance. got it
 

« first day (267 days earlier)      last day (1268 days later) »