Follow Slashdot blog updates by subscribing to our blog RSS feed


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:Big-O is only a small part of performance (Score 1) 218

Programs are not just single algorithms. And data is often in some internal partially digested representation in some sort of data structure. Optimizing can't just be done by improving algorithms and thinking of the data as a black box and just blinding switching algorithms. It requires understanding why and where a program is slow including considering the representation of data. BTW, even with the same data structure it's possible for algorithms to have different "n"s. Consider multi-indexed containers (e.g. Boost's) and algorithms that might work with them*.

* - And yes I know that you can often express the extent of one index as an function on the extent of another index in which case you have the same "n".

Comment r/pebble's Smart Watch Alternatives. (Score 1) 232

After what happened with the Pebble a bunch of r/pebblers put together a list of smart watch alternatives. Might be a good place to start looking into options. I've been looking into the Garmin Fenix smart watches ( possibly the newer announced Fenix 5 ) myself as aside from looks they seem to have what I want in a smart watch. Sounds like Fibit might be looking at doing a proper watch ( as opposed to their typical fitness trackers ) as well based on their purchase of Pebble's software division and some discussions I've seen about.

Comment Re:Why wait? (Score 1) 131

Three ways I see to look at. One is they found the likely cause but want to avoid getting egg on face if it turns out they missed something. Given that they already had a double recall they probably don't want to create the appearance that they are clueless.

The second way I could see it is by pronouncing they can show down third parties releasing their own investigations and could also time when the news got released. Given that CES is this month that can be used one of two ways, either release when press is excited about some new product or to spread the impact to other companies phones that will be announced shortly by implying that it could happen to any phone using the same type of battery.

The third way I could see it is that they have developed a technology that eliminates our greatly reduces the possibility of the problem such as Utah a different type of battery. Having that ready at the same time could give them headstarts against the competitors. Look at how a lot of phones had to be reinforced after the bending iPhone cases. Once the problem is known people will start checking other phones for similar problems.

Comment Re: Big-O is only a small part of performance (Score 1) 218

Yes for the calling code the profiler found O(n log n) was actually closer to O((n+m) log (n+p)) and O(n^2) was more like O((n+q) * (n+r)). Where m was approximately a very large multiple of n; m and p were approximately equal; q and r were also approximately equal and q was approximately a small multiple of n. It was actually a bit more complicated then that, but compared to the main loops most of the rest of the algorithm was a constant. And for the record the function that highlighted as the CPU hog was an over optimized EBCDIC toupper equivalent, i.e. character_code | 0x40. ( And yes that would turn a "^" into "0". )

And no those were not the variable names used in that code. I'm infamous at work for using annoyingly_long_variable_names_that_self_document in my own code.

Comment Re:Big-O is only a small part of performance (Score 1) 218

Yes there are domains where performance is likely to be more of an issue; though not every program targets generic devices.

I work on tools ( compilers, profilers and the like ) and OSes for real-time systems some of which that had way less power and memory than modern smart phones. O(n) is awesome when you can get it but not required or possible everywhere. It's very easy to have one apparently O(n) algorithm call another O(n) algorithm even indirectly ending up with an O(n^2). In any large system complexity is easily hidden between layers, just knowing the big-O of the piece you are working on isn't enough. It's why profilers are so important. Avoid writing code that you know will be slow; but where performance may matter ( and it matters more then many may think ) the only thing to do is to test; ideally a separate tester with both real world and fuzzed data. Likewise the people I know that rewrite software for embedded devices or game consoles don't need to worry about their code running on a machine with lower specs.

That said I always did get a kick out of what happened when you took ancient code that had empty-loops for timing as was common in the 80s and ran it on more modern hardware. And yes tuned code still happens in modern systems, for example some times it actually makes since to ensure the best and worse cases are identical in performance; e.g. to avoid a side-channel attack.

Comment Big-O is only a small part of performance (Score 4, Interesting) 218

While I have a pretty good gut feel of the performance characteristics of my code these days, I know from experience Big-O and company are only part of the picture. Often choosing an algorithm in one place influences the performance of algorithms in another parts of the code. Consider various data structures, the insertion, iteration, and indexing performance; memory use; etc. all get traded off.

A lot of times what profilers point out can be surprising. I remember a couple decades ago finding a bottleneck that was a simple function that compiled to a single 1-clock-cycle inclusive-or instruction that took more of the run time after user inputs then the rest of the code. Yes, one clock cycle per call! The performance problem turned out to be that an O(n * log n) loop that called the inline function had too large an n. Ended off switching to an O(n^2) algorithm that was much faster because I was able to use a vastly smaller n. Just because some algorithm might have a better big-O form, the size of data and constants involved can make another algorithm much better in practice even if it looks like it would be worse purely by big-O.

Comment Re:1/40k devices (Score 5, Informative) 74

Apple did something similar with the iPhone chargers which is why all the new ones had the green dot ( I believe it was 3G charger, which the plugs could end up detached from the charger ). They also did a recall of knock off third party chargers and replaced them with genuine ones after a bunch of issues with including a KIRF charger killing someone.

Submission + - Malibu Media stay lifted, motion to quash denied

NewYorkCountryLawyer writes: In the federal court for the Eastern District of New York, where all Malibu Media cases have been stayed for the past year, the Court has lifted the stay and denied the motion to quash in the lead case, thus permitting all 84 cases to move forward. In his 28-page decision (PDF), Magistrate Judge Steven I. Locke accepted the representations of Malibu's expert, one Michael Patzer from a company called Excipio, that in detecting BitTorrent infringement he relies on "direct detection" rather than "indirect detection", and that it is "not possible" for there to be misidentification.

Comment No real "main" OS (Score 1) 599

At work I use a mix of HP-UX 11.31, Linux RHEL 6, Centos 7 and Windows 8.1, but also use some tablets as reference devices. Can't really say one use is dominant as I'm constantly connecting between machines. At home I switch between OS X, Windows 10, iOS fairly frequently. ( Since Google stopped upgrading my Nexus 10 don't use Android as much. ) Was on my Mac a few minutes ago and am now using my Surface Book. I'll often use multiple machines at the same time.

Slashdot Top Deals

The means-and-ends moralists, or non-doers, always end up on their ends without any means. -- Saul Alinsky