What makes GraalVM Native Image run so lightning fast? - graalvm

What makes GraalVM Native Image run so lightning fast for so many different programming languages?
Nathan Aw (Singapore)

Please see this GraalVM post which reminds about the use cases relative to native compilation.
Additionaly, it details the PGO (Profile Guided Optimization) feature to optimize even further...

Related

Android Things Custom Hardware

I'm interested is it possible to install and use Android Things(former Brillo) on custom produced hardware?
I can see from the official documentation there is preselected and certified SoMs listed, but I'm interested in using my own hardware.
Is it possible to have best of both worlds - use the familiar to me Android & Android Things but run it on proprietary hardware?
If not, what other options do I have - I researched about micropython, but apparently it seems it also comes with designated board(pyboard).
So my question is what are options to not thinks too much about the firmware on the device(and write C code), but focus on more higher-level business logic and programming languages(Java, Python).
Android Things isn't open source, so you can't put it into that isn't officially supported.
If you're looking for custom options, you will need to find a compiled language like C that works for that board. While C may be a bit intimidating, you may be able to find languages that compile to similar machine code. Rust and Go may work on microcontrollers too if you check.
I'm not too familiar with micro python. It says that it compiles to bare metal/machine code, so I believe you should be able to use it on other boards. While they may officially support the compiler for one board, the community may have support for additional microcontrollers.

OpenCV porting for ARM9

I'm new to embedded software, I want to build a Image processing application for my AT91SAM9261-EK development board by Atmel. To make it simple i want to use the OpenCV functions, but i'm not sure how am I going to generate a .bim file for flashing on the brd.
Also can anyone you help me understand the flow / software structure for these kind of applications?
Like, will I need Linux or any other OS, if so where does the actual image processing code which i intend to write using opencv sit ?
Till now for simple codes like Basic LCD project, for this board i'm compiling the code using IAR workbench, so if I want to use the same for opencv functions, is there a way ?
Is there any other open source image processing libraries similar to opencv & easy to integrate with IAR or any other ARM compiler ?
Also it would be really useful if there are any links to some learning documents regarding this
Thanks in advance ?
Depending on your application, I think that CPU is not going to be powerful enough to do any kind of image processing; plus the weirdness of working with a foreign system is not going to make your life any easier.
If using this exact CPU is not super important I'd recommend a Beagleboard or Pandaboard, mainly because Ubuntu has installers targeted to the boards and Ubuntu/Debian offers OpenCV packages out of the box, and this is going to remove a whole lot of hurdles if you're new to embedded development -- basically it turns your dev board into a full-featured computer, just plug in a monitor, keyboard and mouse.
The Raspberry Pi looks to be promising in this regard as well, and you certainly can't argue with the price! (You may be able to install Debian on your board and get access to OpenCV packages this way, but I can't vouch for the ease-of-use of this method compared to Ubuntu, which is difficult enough, especially if you're new to Linux).

Can I use openCL in a application that I distribute to non developer machine?

I recently started to learn how to use openCL to speed up some part of my code. So far the speed gain is impressive. In one case the code ran up to 50X faster than on the CPU. However I wonder if can start using this code in a production environnement. The reason is that the first time that I tried to run the example code, nothing worked. I was able to make it run by downloading the driver on the Nvidia openCL SDK download page (I have a Geforce GTX260). It gave me a blue during installation but after that I was able to run the example program and create my own code.
Does the fact that it didn't work "out of the box" for me mean that the mainstream drivers does not yet support it, despite the fact that it is specifically written that it does on the driver download page? What about ATI support? Will everyone have to download the special driver that gave me a blue screen on install?
In short, is openCL ready for production code?
If someone can give me some details, I'd like to know. Does anyone has been able to run a simple program on a number of different device without installing anything SDK related?
You may find an accurate answer on the OpenCL forums on the Khronos Group message boards. The OpenCL work group hangs out there regularly.
Does anyone has been able to run a
simple program on a number of
different device without installing
anything SDK related?
Nop. For instance, on ATI's GPUs end-users need to install ATI Stream SDK in order to run OpenCL code (just having an up-to-date graphics driver is not sufficient).
You may want to consider trying DirectCompute (Microsoft's version of GPU programming) or doing your OpenCL work on a Snow Leopard Mac. Those are the two ways (that I know of) that you can deliver a GPU programming solution to another user without any driver or other installation hassle.

How can I develop an iPhone application in Perl?

Could someone provide a good link to book about how to develop iPhone application with the Perl programming language?
Why would you want to use Perl? You'd miss out on everything the iPhone SDK gives you, and you wouldn't be in the iTunes App Store.
If you are trying to use Perl because it's the only language you know, just bite the bullet and learn Objective-C. Use the right tool for the right job. Despite how much I enjoy working in Perl, I don't think it's the answer to every problem.
However, if you did want to use the Perl route, you could use it to drive an HTML-based app. You end up installing a mini-website with local storage, etc, on the iPhone. Building iPhone Apps with HTML, CSS, and JavaScript is in O'Reilly's Open Feedback Publishing System, so you could see how to do that for free. Perl might be a tiny, server-side component of that.
Generally Perl is not a good choice here. Without jailbreaking the iPhone, you will need to compile perl into a static library and link it against your byte-compiled code (or build a small app that glues the two together). This seems a lot of work for little benefit, since Perl has no bindings to the various Cocoa and UI elements you'll need to manage your run loop. Why do you want to use perl here?
Jailbroken development is outside the license agreement. Searching "perl iphone" will give you several links on the subject, but I really can't go much further into that.
If you insist on Perl, relax your constraint on it being an iPhone "application". Make it a web application targeted for the iPhone!
Pros
You can use all the Perl you want! Even Catalyst!
Any version of Perl you want, in your own configuration.
Cross platform with other mobile/Internet devices.
Way easier to deploy updates and bugfixes.
Cons
Requires a constant internet connection.
Is accessible outside of the iPhone enviroment.
Isn't in the iTunes store.
Tradition breaker.
If you mean backend to a iPhone application (via XMLRPC), then we are all behind you I believe.
I think Perl is a fine choice for writing a web based mobile app.
mate it with one of these tools for creating a native look and feel for a variety of mobile platforms:
http://code.google.com/p/iui/
http://www.phonegap.com/
http://www.jqtouch.com/
my 2 award winning iPhone mashups run on Perl :)
http://imoviemash.com
http://imusicmash.com
Al

Automatic image rotation based on a logo

We're looking for a package to help identify and automatically rotate faxed TIFF images based on a watermark or logo.
We use libtiff for rotation currently, but don't know of any other libraries or packages I can use for detecting this logo and determining how to rotate the images.
I have done some basic work with OpenCV but I'm not sure that it is the right tool for this job. I would prefer to use C/C++ but Java, Perl or PHP would be acceptable too.
You are in the right place using OpenCV, it is an excellent utility. For example, this guy used it for template matching, which is fairly similar to what you need to do. Also, the link Roddy specified looks similar to what you want to do.
I feel that OpenCV is the best library out there for this kind of development.
#Brian, OpenCV and the IntelIPP are closely linked and very similar (both Intel libs). As far as I know, if OpenCV finds the intel IPP on your computer it will automatically use it under the hood for improved speed.
The Intel Performance Primitives (IPP) library has a lot of very efficient algorithms that help with this kind of a task. The library is callable from C/C++ and we have found it to be very fast. I should also note that it's not limited to just Intel hardware.
That's quite a complex and specialized algorithm that you need.
Have a look at http://en.wikipedia.org/wiki/Template_matching. There's also a demo program (but no source) at http://www.lps.usp.br/~hae/software/cirateg/index.html
Obviously these require you to know the logo you are looking for in advance...

Resources