News for hackers. Stuff that matters.
Re:Golang – encoding/csv: Reading is slow by endymi0n on Saturday September 03, 2016 @03:09PM (#12420582)
On a related note, also the Go stdlib regex package is pretty naive and imperformant compared to a full blown and modern backtracking PCRE implementation (at 1/10 the LOC and complexity) - same thing goes for the reflection based JSON package (which is still kinda "fast enough").

The focus wasn't so much on performance but on initial completeness, good interface, versatility, clarity and simplicity - with faster or more specialized implementations left to the community.

There might be different opinions about that, but I personally like the approach of having a solid and ordered programming pocket knife - that also doesn't replace a Katana for cutting.

Re:Golang – encoding/csv: Reading is slow by dsymonds on Saturday September 03, 2016 @05:02PM (#12421183)
The standard regexp package, unlike PCRE, is actually a proper regular expression parser/matcher. Anything doing backtracking is at risk of exponential blowup and isn't safe.

https://swtch.com/~rsc/regexp/regexp1.html

Re:Golang – encoding/csv: Reading is slow by endymi0n on Saturday September 03, 2016 @05:29PM (#12421307)
which is exactly what I meant with less specialized but safe :)
Re:Golang – encoding/csv: Reading is slow by jonlawlor on Saturday September 03, 2016 @05:59PM (#12421426)
It is also often much faster than pcre.
Re:Golang – encoding/csv: Reading is slow by paulddraper on Saturday September 03, 2016 @06:57PM (#12421668)
On differing opinions: I prefer having a Katana, an automatic shotgun, and a spy drone, and leaving the pocket knife at home.

In other words....C/C++ :) I just try not to blow off my leg.