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

 



Forgot your password?
typodupeerror
×

Comment Re:It's not just x86 (Score 1) 249

...Of course, since the biggest bottlenecks in code usually occur in essentially serial sections of code, you can't just reorder them and hope for the best.

Well, that's highly dependent on your code. If you're writing something like matrix manipulation or most image processing routines, none of your code is particularly serial. You can even get away with things like WAW hazards because of register renaming.

If you've already done all of the high-level optimization that you can, maybe it's time to start looking at a VTune or CodeAnalyst and figuring out where your branches are being mispredicted and where you're seeing stalls. But the reality is, those optimizations get you the last 20%, which doesn't mean shit if your algorithm is inefficient or accesses memory inefficiently.

TFA using examples such as shift-vs-multiply sound like your grandfather complaining that you don't double-clutch on downshifting into first gear. "True" in the sense that yes, it once had meaning and no longer does - But totally wrong in the sense that people who think about their code at that level have moved beyond such trivialities and onto actual modern ones such as how to feed N pipelines so as to minimize stalls, or what degenerate conditions flog the latest branch prediction techniques (or more usefully, as a classic example, how to write your code so as to minimize branching)

I also hate the 'instruction weenie' optimizations. It doesn't matter (for example) if an integer multiply instruction has two-cycle latency and a shift instruction has one-cycle latency. Something like 1 in 5 instructions is a memory access, and another 1 in 5 is a branch. Both of those are potentially far more problematic than an extra cycle that's probably going to be scheduled around anyway.

Mostly this article sounds like exactly the reasons I don't like Java for every task, and why the vast majority of Java apps feel like molasses in January despite every benchmark telling you that in theory they run just as fast as unmanaged code - Because although you can do the above, you have to work against the language rather than with it.

Pretty much no benchmark shows Java (or .NET) running as fast as unmanaged code with a decent compiler; even the best JIT runtimes usually come out in the 50-70% range.

Also, Java doesn't feel slow because of execution performance. It feels slow because it has crappy UI libraries that are slow. There are many, many GTK+/Python apps that are perfectly fine despite the fact that Python is abysmally slow compared to even Java.

When merely assigning a value to a basic machine-supported data type (32 bit integer, as the simple example) involves an implicit function call (and the whole stack-frame preservation that entails)

I'm not sure where you're getting this, but assigning to an int (not an Integer) in Java does not involve a function call in any mainstream JRE I'm familiar with; indeed, it performs very similarly to assignment in C.

The big fault of Java (and also .NET) is that the JIT doesn't have very much time to optimize. Compared with unoptimized C/C++ compilers, Java is considerably faster. It's only once you add the substantial benefits of optimization (loop unrolling, constant propagation, function inlining, instruction scheduling, and a whole host of other optimizations) that the JIT starts to look pretty crappy.

Simple cases, like assignment to an int, are well-optimized by the JIT.

Comment Re:My psychic prediction (Score 1) 306

That would be so cool. Imagine a vastly powerful, intergalactic race, tracing the origins of the only extraterrestrial contact they've ever had, these probes. Imagine they find their path circling back around, to originate from their very own home planet, from so far in the past as to be lost beyond memory.

Awesome.

Which trilogy was that again?

Comment Re:Debug key (Score 1) 806

Even more fun, holding down all four at once doesn't work with many laptops. Probably the easiest way to do it is to hold alt, hold fn, press sysrq, release sysrq, release fn, press k, release alt. It took me about 10 minutes of experimentation to find that specific sequence...

Comment Re:"Those who've never studied history are doomed. (Score 1) 372

That is poor logic. It is possible for any virus to mutate and become extremely dangerous. It is also possible for the mutation to cause existing vaccines to not work. The 1918 had a mortality rate of about 10%, and it was obvious to everyone that the current version wasn't anywhere near as dangerous. So spending a ton of money on vaccines for a single virus that isn't that dangerous, and might not even work if it became dangerous, when many other viruses have the same risks is poor judgment at best.

Now, if a highly virulent strain of human infectious airborne Ebola begins spreading through the US, then I'd be worried.

Comment Re:Vision is not the only immersion factor. (Score 1) 130

For the record that music is from the movie Where Eagles Dare , starring Richard Burton and Clint Eastwood. It's a pretty entertaining WWII yarn, especially when the music swells and you hear that iconic drum roll. I didn't know about the movie until late one night when I was in my twenties I caught it on cable and said, "Hey, that's the music from Wolfenstein!" It's one of my favorites now.

Censorship

Iran Moves To End "Facebook Revolution" 838

We've had a few readers send in updates on the chaotic post-election situation in Iran. Twitter is providing better coverage than CNN at the moment. There are both tech and humanitarian angles to the story, as the two samples below illustrate. First, Hugh Pickens writes with a report from The Times (UK) that "the Iranian government is mounting a campaign to disrupt independent media organizations and Web sites that air doubts about the validity of the re-election of Mahmoud Ahmadinejad as the nation's president. Reports from Tehran say that social networking sites such as Facebook and Twitter were taken down after Mr Ahmadinejad claimed victory. SMS text messaging, a preferred medium of communication for young Iranians, has also been disabled. 'The blocking of access to foreign news media has been stepped up, according to Reporters Without Borders. 'The Internet is now very slow, like the mobile phone network. YouTube and Facebook are hard to access and pro-reform sites... are completely inaccessible.'" And reader momen abdullah sends in one of the more disturbing Ask Slashdots you are likely to see. "People, we need your urgent help in Iran. We are under attack by the government. They stole the election. And now are arresting everybody. They also filtered every sensitive Web page. But our problem is that they also block the SMS network and are scrambling satellite TVs. Please, can you help us to set up some sort of network using our home wireless access points? Can anybody show us a link on how to install small TV/radio stations? Any suggestion for setting up a network? Please tell us what to do or we are going to die in the a nuclear war between Iran and US." Update: 06/14 18:32 GMT by KD : Jim Cowie contributes a blog post from Renesys taking a closer look at the state of Iranian Internet transit, as seen in the aggregated global routing tables, and concluding that the story may not be as clear-cut as has been reported.

Comment Yes, but... (Score 1) 358

Yes, if they can get some actual science done.

A blind man could see in a minute that there's something going on with the atmosphere. We have all kinds of anecdotal evidence that temperatures are warming. We don't need any more suppositions as to the cause of this trend.

What we desperately need are scientific facts, not predictions based on mathematical models. We've seen what using unsound mathematical models can do in the financial sector. We know from historical records that just within the last thousand years it has been both warmer and cooler than it is now. We need a rigorously tested model that can account for what we already know. The model that generated the famous 'hockey stick' need not apply.

One other thing that would be valuable is a worldwide sensor network to get some rigorously defined temperature data. What we have now is a hodgepodge of airport readings surrounded by asphalt, land grant university instruments in rural locations, and various other methods and locations that don't give us an accurate picture.

In short, if politics and activism can be kept out of a nascent climate service, we might actually learn something useful. We, and by we I mean Americans, need to tackle this problem without bankrupting ourselves. We need to know the facts, and to how many decimal places.

Books

Google To Remove "Inappropriate" Books From Digital Library 192

Miracle Jones writes "In an interview with Professor (and former Microsoft employee) James Grimmelmann at the New York Law School, who is both setting up an online clearinghouse to discuss the Google book settlement and drafting an amicus brief to inform the court about the antitrust factors surrounding "orphan books," he revealed that Google will be able to moderate the content of its book scans in the same way that they moderate their YouTube videos, leaving out works that Google deems "inappropriate" from the 7 million library books it has scanned. The Fiction Circus has called for a two-year long rights auction that will ensure that these "inappropriate" titles do not get left behind in the digital era, and that other people who are willing to host and display these books will be able to do so. There is only one week left for authors and publishers to "opt out" of the settlement class and retain their rights or raise objections, and Brewster Kahle's Internet Archive has been stopped from jumping on board Google's settlement as a party defendant and receiving the same legal protections that Google will get. A group of authors, including Philip K. Dick's estate, has tried to delay the settlement for four more months until they get their minds around the issue." In related news, Google is seeking a 60-day extension to the period in which it's attempting to contact authors to inform them of their right to opt-out of the terms of the settlement.
Books

Was the Amazon De-Listing Situation a Glitch Or a Hack? 396

Miracle Jones writes "As Amazon struggles to re-list and re-rank gay, lesbian, and adult books on their website after massive public outcry against the secretive partitioning process, they are claiming that the entire situation was not the result of an intentional policy at all, are not apologizing, and are instead insisting that the situation was the result of 'a glitch' that they are now trying to fix. While some hackers are claiming credit for 'amazonfail,' and it is indeed possible that an outside party is responsible, most claims have already been debunked. How likely is it that Amazon was hacked versus the likelihood of an internal Easter weekend glitch? Or is the most obvious and likely scenario true, and Amazon simply got caught implementing a wildly-unpopular new policy without telling anyone?"
Image

iTunes Prohibits Terrorism 124

Afforess writes "A recent closer look at the oft-skimmed EULA agreement for iTunes has an interesting paragraph in it, Gizmodo reports. 'You also agree that you will not use these products for any purposes prohibited by United States law, including, without limitation, the development, design, manufacture or production of missiles, or nuclear, chemical or biological weapons.' Although humorous, some readers suggested that this may be a defense measure to previously discussed price changes in the iTunes music store."
Security

Could the Internet Be Taken Down In 30 Minutes? 289

GhostX9 writes "Tom's Hardware recently interviewed Dino A. Dai Zovi, a former member of Sandia National Labs' IDART (the guys who test the security of national agencies). Although most of the interview is focused on personal computer security, they asked him about L0pht's claim in 1998 if the Internet could still be taken down in 30 minutes given the advances on both the security and threat sides. He said that the risk was still true."

Slashdot Top Deals

What is research but a blind date with knowledge? -- Will Harvey

Working...