News for hackers. Stuff that matters.
Re:Faster than C? Parsing binary data in JavaScript. by aptwebapps on Monday October 08, 2012 @02:14AM (#4625704)
What's a modern libc? Not being snide or anything: I have no idea. I didn't know where to look so I looked at glibc [1] and that, in fact, does seem to be how it works.

[1] http://sourceware.org/git/?p=glibc.git;a=blob;f=string/strcm...

Re:Faster than C? Parsing binary data in JavaScript. by pbsd on Monday October 08, 2012 @02:36AM (#4625750)
You might want to look at the non-generic implementations, like http://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/x86_...
Re:Faster than C? Parsing binary data in JavaScript. by darklajid on Monday October 08, 2012 @03:10PM (#4628338)
This might be the most delicious piece of code ever written ( I cannot judge that, really), but we're talking 2307 lines for a string comparison.

I'm impressed, but also scared and amused. I always look with envy at system level guys, lacking the knowledge to play on that level. This, though, comforts me quite a bit. That's just not my definition of 'fun'.

Re:Faster than C? Parsing binary data in JavaScript. by aptwebapps on Monday October 08, 2012 @04:47AM (#4626027)
I've never written anything non-trival in C and even that was ages ago so I didn't hope to be able judge the niceties of different implementations but I can't even tell what the algorithm is in that one.
Re:Faster than C? Parsing binary data in JavaScript. by pirateking on Monday October 08, 2012 @02:24AM (#4625726)
I have heard of musl[1] and Bionic[2]. Interested in hearing about any others.

[1] http://www.musl-libc.org/

[2] http://en.wikipedia.org/wiki/Bionic_(software)

Re:Faster than C? Parsing binary data in JavaScript. by aptwebapps on Monday October 08, 2012 @04:50AM (#4626032)
Those seem to both use basically the same algo as the glibc one, all though a little more compactly written.
Re:Faster than C? Parsing binary data in JavaScript. by justincormack on Monday October 08, 2012 @04:28AM (#4625988)
Uclibc and dietlibc. Must recommend Musl for code readability and implementation quality.