Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:Generic Programming (Score 2) 42

Generic programming in many languages uses virtual dispatch as everything is an Object, in contrast to C++ templates' that create a class/function catered to the type requested. So, it isn't all bad.

With C++'s templates, the compiler often produces better code for generic vs non-generic( c++ std::sort vs c qsort). Generic is faster because the compiler can reason about the data type being sorted better and doesn't have to use a type erased comparison function(c's qsort uses a int(void*, void*) type function pointer. In C++ as long as your data type has less than, it works or you can pass a function like bool is_less( Type a, Type b)

The biggest bottleneck it seems is feeding today's cpu's. The STL's algorithms are a great aid to this. Thinking in terms of sorts, rotations, partitions, transforms...etc keeps the code small and clear. Also, it allows one to easily reason and improve upon the algorithm. Most of them can be parallelized without changing the observable behaviour(mostly). So dropping in a parallel version can be very easy. Following this chain of thought, one can easily account for things like false sharing in the algorithm and not in an ungodly for loop with 5 or 6 branches.

Comment So, make it hard (Score 1) 446

If everyone started connecting to many other random other services on the network all the time, you could effectively hide in the crowds. Just make sure that the connections last long enough to be meaningful. Something like a web spider that constantly probes at a specific data rate. Throw in some sophistication with regards to data transfer, repition of connnections, etc and you may be able to hide. Also, if enough people do it, it will cost the ISP much to store the information and make it irrelivant. The trick is to make your browsing look random, which can be difficult; also you would need to filter for stuff like child porn and other stuff you definitely do not want associated with yourself.

Comment Not that much (Score 2, Interesting) 272

You can do it "well" on a dual core with 4GB of ram. Even less, but with todays prices you can get a system for a couple hundred if you watch for sales. RAM is you biggest killer that you will notice. Then again, with quad cores with VM assistance going for under $200CDN, thats relatively cheap. If you're worried about HD performance a couple 500GB drives striped will give you over 100MB/s of read speed a relatively small investment.

Slashdot Top Deals

What this country needs is a good five cent microcomputer.

Working...