News for hackers. Stuff that matters.
Re:The PC is not dead, we just don't need new ones by carterschonwald on Thursday October 24, 2013 @01:00PM (#6606394)
Emphatic agreement. I wind up helping folks a lot with writing high performance software, and it's very easy to get to the point where the time to run a model is totally determined by how fast the CPU and IO are. I'm talking problems where naively written C would take an hour, but if I'm careful and use some blend of very clever c or Haskell, the computation is done in 2-5 minutes
Re:The PC is not dead, we just don't need new ones by x0x0 on Thursday October 24, 2013 @03:45PM (#6607450)
in machine learning, as soon as you stop using linear models which are normally quite fast to compute, models will be as slow as you can tolerate.

for example: random forest, gradient boosting, gam, etc -- you will typically do parameter searches and the models you get are as good as your willingness to wait. Good software will run at a significant fraction of memory bus speed and the faster that bus goes the better your models will be.

Re:The PC is not dead, we just don't need new ones by carterschonwald on Thursday October 24, 2013 @04:50PM (#6607862)
exactly! This winds up being a memory locality / layout problem often times!

eg: most CPU memory traffic is in "cachelines" size chunks so you're best off trying to organize information so you can use all bandwidth! I've a few ideas on this i'm trying to bake into an array/matrix library i hope to release soon. :)

Re:The PC is not dead, we just don't need new ones by awef on Thursday October 24, 2013 @01:41PM (#6606663)
What kind of problems are those? I would love to find problems, ultimately examples, where smart Haskell and c blends are superior to pure c.
Re:The PC is not dead, we just don't need new ones by dikei on Thursday October 24, 2013 @02:15PM (#6606883)
It's not neccesarily which language is faster, but the which algorithm is faster. He said naively written C, which mean the algorithm may be entirely different and run in O(n2) and much slower than a Haskell version which use a different algorithm and run in O(nlogn).
Re:The PC is not dead, we just don't need new ones by carterschonwald on Thursday October 24, 2013 @04:19PM (#6607684)
actually in the specific example I'm thinking about, i'm talking about memory locality being the performance difference (and in this case, array layout for matrix multiplication).

The naive obvious "dot product" matrix mult of two Row Major matrices is 100-1000x slower than somewhat fancier layouts, or even simply transposing the right hand matrix can make a significant difference, let alone more fancy things.

Often the biggest throughput bottleneck for CPU bound algorithms in a numerical setting is the quality of the memory locality (because the CPU can chew through data faster than you can feed it). Its actually really really hard to get C / C++ to help you write code with suitably fancy layouts that are easy to use.

Amusingly, I also think most auto vectorization approaches to SIMD actually miss the best way to use SIMD registers! I've actually some cute small matrix kernels where by using the AVX SIMD registers as a "L0" cache, I get a 1.5x perf boost!

Re:The PC is not dead, we just don't need new ones by dikei on Friday October 25, 2013 @04:10AM (#6610355)
This is like replacing the compiler optimizer algorithm with your own, similar to the method of writing critical function in Assembly, right?

Still I don't see the connection to Haskell, can you elaborate ?

Re:The PC is not dead, we just don't need new ones by carterschonwald on Saturday October 26, 2013 @03:33AM (#6616696)
oh, thats just me rambling about why i don't trust compiler autovectorization :)

well: 1) i've been slowly working on a numerical computing / data analysis substrate for haskell for over a year now.

2) the haskell c ffi is probably the nicest c ffi you'll ever see. Also pretty fast, basically just a known jump/funcall! And no marshaling overhead too!

3) theres a lot of current and pending over the next year work to make it easy to write HPC grade code using haskell. Some approaches involve interesting libs for runtime code gen (the llvm-general lib for haskell is AMAZING).

Theres also a number of ways where ghc haskell will likely get some great performance improvements for numerical code over the next 1-2 years! (i've a few ideas for improving the native code gen / SIMD support over the next year that I hope to experiment with as time permits)

Re:The PC is not dead, we just don't need new ones by awef on Thursday October 24, 2013 @02:26PM (#6606960)
Right, I read 'naively' as 'natively'. Carry on!
Re:The PC is not dead, we just don't need new ones by carterschonwald on Friday October 25, 2013 @12:44AM (#6609805)
to answer your question

just plain ole mathematical modeling / machine learning, and associated duct taping the tubes.

I am also going to be releasing the start of a "Numerical Haskell" tool chain sometime (hopefully this fall, but life happens and all that jazz)

Re:The PC is not dead, we just don't need new ones by shocks on Thursday October 24, 2013 @01:57PM (#6606767)
Your problems sound interesting. Could you elaborate?
Re:The PC is not dead, we just don't need new ones by carterschonwald on Friday October 25, 2013 @12:43AM (#6609804)
just plain ole mathematical modeling / machine learning, and associated duct taping the tubes.

I am also going to be releasing the start of a "Numerical Haskell" tool chain sometime (hopefully this fall, but life happens and all that jazz)