Re:How and Why Mixpanel Switched from Erlang to Python
by carbonica on Saturday August 06, 2011 @10:36AM
(#2853927)
If string processing is a bottleneck in your system, either your system isn't doing anything else interesting to take up CPU time, or you've done something very, very wrong. Serialization is a damn-near solved problem.
[ Parent
| on HN ]
Re:How and Why Mixpanel Switched from Erlang to Python
by silentbicycle on Saturday August 06, 2011 @12:58PM
(#2854292)
Newcomers to Erlang tend to do string handling with a heavy Ruby/Java/whatever accent. That's the problem. The default Erlang string type is a linked list of ints (which can be pattern-matched on), but atoms (AKA "symbols" is Lisp, Ruby, etc.) and binaries (arrays of raw binary data) address situations that need more specific trade-offs.
In particular, redundant string concatenation and flattening tends to be CPU hog, but IO-Lists automatically flatten all string types during transmission and have already been thoroughly optimized.
Of course, if you ignore the serialization solutions Erlang provides, there is a performance hit.
Re:How and Why Mixpanel Switched from Erlang to Python
by EponymousCoward on Saturday August 06, 2011 @03:13PM
(#2854651)
It's a web server that hands off to a queue. What do you think it's doing besides serialization?