jump to navigation

Remarkably slow May 5, 2007

Posted by hackberry in blackberry, software.
add a comment

I finally got around to writing a simple benchmark to compare Java implementations. Collatz measures how quickly a Java implemenation (more specifically, an MIDP implementation) can perform basic arithmetic and function calls, by computing the first 30,000 Collatz numbers and measuring how long it takes using System.currentTimeMillis().

I also implemented the same benchmark in C for comparison, and ran a standalone version on Java2SE. Host-based benchmarks were run on a Pentium M 1.4 GHz, using Java version “1.4.2_14-b05″ and midp2.0fcs.

C 33289 iter/ms
Java SE 7990 iter/ms
MIDP 2.0 1595 iter/ms
BlackBerry 8800 240 iter/ms

It’s interesting that the hosted MIDP implementation runs equivalent code slower than JavaSE, but that could be down to a variety of factors (not least, it now occurs to me, that the benchmark inner loop has a function call which is a member of a class which extends and implements in the MIDP version, but not in the JavaSE version; now granted, it’s private static final so in theory it shouldn’t matter).
What’s really interesting, though, is that the Blackberry is six times slower than the hosted MIDP emulator, and 33 times slower than the JavaSE VM. (Never mind the 130x slowdown versus native code.) At speeds like this, I think Javascript (on host) is going to be faster than on-device Java…

Debugging an outage April 22, 2007

Posted by hackberry in blackberry, software.
add a comment

The recent outage had one positive effect for me — it led to me finding the Network Diagnostics Test dialog. (Settings -> Options -> Mobile Network -> menu -> Diagnostics Test -> menu -> Run.)

Writing MIDlets, Poking around, and GPS April 5, 2007

Posted by hackberry in blackberry, software.
add a comment

It’s easy to write a simple app that runs on the Blackberry. This tutorial had us building code within the hour (starting from a java-free MacOS X machine). Getting it to load OTA was a little bit of a trial since the JAD file generated by Ant wasn’t quite up to snuff, but with a little bit of manual jiggery it loaded nicely. For BlackBerry-specific questions, the BlackBerry Developer KnowledgeBase looks to have a wealth of useful information for curious minds.

So can we use these tools to take advantage of the nifty features of the Blackberry — say, GPS? I think we can. There’s a blackberry.com knowldegebase article that hits some of the details. Then there’s JSR 179, Location API for J2ME, which promises to be the APIs implemented.

Finally, what can we learn from within the BlackBerry UI? There’s a suprising amount of interesting technical detail lurking in Settings->Options->Advanced Options.

Applications allows you to see all the application bundles loaded on the system — including, apparently, the Java classes they include! For example, highlighting “BlackBerry 4.2 Core Applications” and choosing Menu->Modules tells me that among others, it implements net_rim_app_manager_console 4.2.1.772.

GPS has a “Refresh GPS” menu choice, which cogitated for a while and told me I was at N 37° 47.1981′ W 122° 23.9948′ with an accuracy of 15.5m, according to 5 satellites. Most interesting, especially considering I declined to pay for the value-add GPS option from my carrier.

JIT for Java April 4, 2007

Posted by hackberry in blackberry, software.
add a comment

How does a relatively slow processor like the Xscale run programs in a bytecode language like Java and not have performance suck as a result?

One technique is JIT. So does Blackberry implement JIT? The reasonably good performance of sophisticated apps like Browser lead me to believe so. here (google cache link, the original article is behind a login screen here) is an article from 2002 in System News that talks about the then-new topic of productizing Java JIT on ARM and includes some quotes from RIM folks.

8700c tear-down March 28, 2007

Posted by hackberry in blackberry, hardware.
add a comment

Ah, now we’re getting somewhere. Commsdesign.com has a tear-down of a BlackBerry 8700c. Of course there are going to be differences in the new design, but heritage will show.

Highlights:

  • CSR BC41814 for Bluetooth (and GSM?)
  • PXA901B3C312 “Hermon” Xscale baseband and applications processor
  • Flash and DRAM integrated in MCM with Xscale

Hardware beginnings March 26, 2007

Posted by hackberry in blackberry, hardware.
add a comment

Last Friday I purchased a BlackBerry 8800. Being the curious type that I am, I immediately started poking around to find out more about the hardware. I found suprisingly little information.

  • Xscale @312 MHz (according to phonescoop)
  • 64 MB DRAM

I’m curious what the chipset BOM looks like — is the XScale used for all the peripherals, or is there a supporting chipset? The Greenphone is a nice comparison for this purpose — since it boots a development kit and kernel source is available, you can explore the hardware more than is possible on a polished end-user bundle like the 8800.