Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

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.


New York City Street Lights To Go LED 303

eldavojohn writes "Wired has a short piece on NYC's new street light project. I don't think we need to belabor the many benefits that LEDs hold over traditional light bulbs, but the finishing touches are being addressed, and they will hopefully be put into place sometime next year. This design won a competition back in 2004, and OVI has been whittling down the prototypes. At $1.175 million, this sounds like a pretty cheap deal considering the DOE forked over $21 million to 13 R&D projects along the same lines."

Slashdot Top Deals

For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken