JRE performance respect to J2ME

I benchmarked this recursive code :
    public static long fib_recur(int n) {
        if (n <= 1) return n;
        else return fib_recur(n-1) + fib_recur(n-2);
    }and the performance for J2SE 1.5 was 10 times slower than J2ME on the nokia 6030, motorola C385 and siemens C72,all low end phones.
But the iterative version was 4 times quicker in J2SE, is this performance diffence normal, one would expect a P4 to be quicker than a phone.

I benchmarked this recursive code :
    public static long fib_recur(int n) {
        if (n <= 1) return n;
        else return fib_recur(n-1) + fib_recur(n-2);
    }and the performance for J2SE 1.5 was 10 times slower than J2ME on the nokia 6030, motorola C385 and siemens C72,all low end phones.
But the iterative version was 4 times quicker in J2SE, is this performance diffence normal, one would expect a P4 to be quicker than a phone.

Similar Messages

  • JRE performances while executing small components

    Hello,
    I am developing a very small component that will be executed on a very busy machine.
    For this reason I am concerned about the performances while using the JRE to executing it.
    The component will also be called multiple times, possibly in parallel.
    My question is: how does the JRE works in this case?
    Will the JRE loaded on the memory every time the component is executed, or will it be loaded before?
    Thank you

    The JRE will be loaded for each process that is created.
    And the detail you provided doesn't provide enough informaton to indicate whether there is a server application running this or a new process is invoked each time.

  • Running different JRE on the same system to measure JRE Performance

    Hey there,
    I want to run several java benchmarks on different runtime environments on the same system.
    Now, I need to know what I have to consider that those machines do not affect each other?
    What do I need to consider while installing those different runtime environments.
    How do I have to set the classpath, etc. - I guess it shouldn't be set...
    Are there any files in the operating system that could affect the different JRE versions, such as java.exe and javaw.exe in the Windows NT System directory? What do I have to do with those files?
    And which would be the proper steps to reach a meaningful result?!
    Right now I am using Windows NT, but I will also try to run some tests on Linux! So, I am open for any kind of help!
    Thanks,
    Marc

    Hi Marc,
    Have you considered installing one JRE at a time and running your benchmarks? Before installing the next JRE, uninstall
    the existing JRE. Thus eliminating any possibility of
    overwriting/corrupting any of the Windows NT System
    directories or registry settings.
    -Sun DTS

  • Graphical benchmark for Java (J2ME) phones and PDAs: JBenchmark

    JBenchmark measures the performance of Java (J2ME) enabled phones and PDAs, by running 5 small tests, each lasting for 10 seconds:
    1. Text
    2. 2D Shapes
    3. 3D Shapes
    4. Fill Rate
    5. Animation
    Check results and download software at www.jbenchmark.com!

    Wow.. i thought I bought a good phone. But reading the JBenchmark for the SonyEricsson T610 wasn't fun at at all. Are other phones really up to 3 times faster? Anyone with experiance from testing with other phones?

  • How to access variables passed in custom tag body

    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".
    Edited by: coolkomal on Jun 3, 2009 7:45 AM

    coolkomal wrote:
    I am developing custom tags in my application. I need to pass some variables from the .jsp file into tag file. I want these to be passed as body of the tag rather than as tag parameter. It seems the correct syntax for this is:
    <myTags:display> someVariable </myTags:display>
    Question 1: Can I not use this as: <myTags:display someVariable /> Since this tag will be used at many places in the jsp, I dont want to write myTags:display twice for every usage.
    <myTags:display var="<%=someVariable>"/> is a valid syntax for performing respective action of that variable. You can also use EL to pass the variable ${someVariable} provided the custom tag provide support for EL.
    >
    Question 2:
    I want to call the tags from main.jsp like:
    <% String var1 = "Display Me Please"; %>
    <myTags:display var1 />
    Just ensure that you declare all the related variables in Main.jsp and statically include Main.jsp in your jsp such that you do the checking
    [http://java.sun.com/products/jsp/tags/11/syntaxref117.html]
    >
    I want the tag file to do some processing on the value stored in var1. I've written the following code in tag file, display.tag:
    <jsp:doBody var="theBody" />
    <% Object obj = (Object) request.getAttribute ("theBody"); %>This code snippet gives me access to obj which has the value "var1". Now how do I access the value that is contained in "var1".Can be done provided you code it the right way. Start learning basics of how to create custom taglibraries to gain more knowledge on how things can be managed.
    [http://java.sun.com/javaee/5/docs/tutorial/doc/bnalj.html]

  • Entry in VTSP table

    Hi,
    Does anyone knows why a shipment with a stage, would not result in an entry in the VTSP table? We have now 616 entries in the VTTK table, of which 43 did not result in an entry in the VTSP table.
    Our shipments will always go to 1 ship-to-party, (belonging to 1 sold-to-party). Which would result in 1 incoterm which is valid for all of the deliveries within a shipment. The program RVADTR01 seems to check in the form: get_data_cmr_14 whether or not there is an entry in the VTSP table... if not, no checkbox (Franco or Non-Franco) is being set on the CMR.
    Is it correct that the entries did not end up in the VTSP? Why?
    Thanx! Eric

    Hi,
    This table will be updated when there exists Vendor who is for a automatic invoice settle ment .purpose.In the Vendor there will be a check box for ERS.When you check this box invoices can be settled automatically.
    For example if there is a PO for house rent which had to be paid monthly(which are called as invoicing plans) this type of procedure come into pictiure.
    Basically the table EKRS ERS Procedure: Goods (Merchandise) Movements to be Invoice will be updated through a payment at the transaction code MRRL.
    The text for the ERS will be
    Evaluated Receipt Settlement (ERS)
    Specifies that evaluated receipt settlement (ERS) or the automatic generation of invoices according to an invoicing plan is to be possible in relation to materials supplied or services performed (respectively) with regard to this vendor or this document item.
    Use
    If you wish to settle up with regard to PO or scheduling agreement items involving this vendor using Evaluated Receipt Settlement (ERS), this indicator must be set.
    This indicator must also be set if you wish to work with purchase orders used in conjunction with invoicing plans when procuring external services.
    Regards,

  • Entry in EKRS table

    Hello all,
    Can you please explainw,when entry will be posted in EKRS table?
    Regards,
    Shyam

    Hi,
    This table will be updated when there exists Vendor who is for a automatic invoice settle ment .purpose.In the Vendor there will be a check box for ERS.When you check this box invoices can be settled automatically.
    For example if there is a PO for house rent which had to be paid monthly(which are called as invoicing plans) this type of procedure come into pictiure.
    Basically the table EKRS ERS Procedure: Goods (Merchandise) Movements to be Invoice will be updated through a payment at the transaction code MRRL.
    The text for the ERS will be
    Evaluated Receipt Settlement (ERS)
    Specifies that evaluated receipt settlement (ERS) or the automatic generation of invoices according to an invoicing plan is to be possible in relation to materials supplied or services performed (respectively) with regard to this vendor or this document item.
    Use
    If you wish to settle up with regard to PO or scheduling agreement items involving this vendor using Evaluated Receipt Settlement (ERS), this indicator must be set.
    This indicator must also be set if you wish to work with purchase orders used in conjunction with invoicing plans when procuring external services.
    Regards,

  • Oracle and Javascript

    I am trying to provide we interface to an Oracle database (version 8.0.5).
    Problems:
    I encounter errors ORA-12154 and ORA-01001 when I try connecting to the datbase using
    database.connect()
    and accessing a table using database.cursor(...) respectively.
    I have checked my tnsnames.ora and I guess there's no rpoblem there.
    What else can cause this.
    Kindly reply to [email protected]
    Thanx

    Hi,
    You mentioned click action on div element, but your code is click action on button. get Xpath of div element and perform respective action on the same.

  • Oracle Openscript and javascript functions

    I'm using Openscript on a form page that is using a clickable div "save" button. When the button is clicked manually a javascript event is executed to save the changes on the page. When I play back the script, the script clicks on the button and gets redirected to the next page but does not save the changes I made on the text boxes. I'm guessing it doesnt run the ng-click updateUser() function when doing a playback. How can I get openscript to click on the save button and run the javascript function?
    Openscript code:
    web.button( "/web:window[@index='0' or @title=Payment Processor']/web:document[@index='0']/web:form[@name='form' or @index='0']/web:button[@index='1']") .click();
    This is what the div save button code looks like:
    <div class="row"> <div class="col-xs-12"> <button class="btn btn-primary" ng-click="updateUser()"> <i class="fa fa-asterisk"></i> Save </button>  </div> </div>

    Hi,
    You mentioned click action on div element, but your code is click action on button. get Xpath of div element and perform respective action on the same.

  • Invalid or no mapping to system data types found.

    Hello Netweaver gurus.
    One of my client faces this issue. Has anybody come across similar error types ?
    Regards,
    Nitin Koushik

    Hello Nitin,
    In my opinion the error is because you would not be using an appropriate Entity to perform respective operation and can also be due to invalid mapping e.g. NUMC to Edm.Decimal
    Lets say you have an Entity 'A' to Update a media content to BE. You can use the same Entity 'A' to Read the updated media content as well.
    Leta say now you want to Read set of data from BE ( Not a Media content )
    You cannot use the Entity 'A' to perform this. You need to have a different Entity which will get the info needed from BE.
    Even if you forcefully try to map the response in code level, you will get the error ' Invalid or no mapping to system data types found '. This is because Entity 'A' would have got the special semantics to Read the media content not the set of data.
    Kindly check this and also the Types , Type Lengths , No of Decimal Places etc...used in Model
    Regards,
    Ashwin

  • Pre Calculated Web Template?

    Hello,
    Can someone please provide a link or two on Pre Calculated Web Templates?
    My hope is to create an iView that has certain application parameters to pull STATIC data from a pre-run BW report that also further filters the data into a specific field such as cost center.
    Please visit the below thread for the long-winded explanation.
    /thread/69935 [original link is broken]
    Regards,
    Patrick

    Hallo Patric
    Below a link. Have a look at the attribute READ_MODE
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9e/9f653ade969f4de10000000a114084/frameset.htm
    Basically when you have a Precalculated Template, the system first run a report (which has been scheduled) and read the data from there when you run your template. This can imrpove the performance respect to online read data.
    Mike

  • PopupMenuButton: Can not Stop 'click' event

    Hello Everybody,
    I am working with a PopupMnuButton. The PopupMenuButton is
    skined so the selected value is not visible. The menu has four
    items which when clicked performs respective operations. But when
    the main button of the PopupMenuButton is clicked it performs the
    operation for the first menu item. I wish to stop that from
    happening.
    Going through the help files I found that PopupMenuButton
    dispatches a click event when the main button part of the
    PopupMenuButton is clicked, which further dispatches the itemClick
    event for the last selected index.
    Is there a way around to stop the click event from firing
    when the main button is clicked?
    I dont want any action to take place if the button is
    clicked. The user has to select an item from the menu.
    Please advise.
    Regards,
    Paromita

    Hi Tracy,
    No setting selectedIndex value to -1 did no work as
    slectedIndex is a private property for PopupMenuButton so can't
    access from the application. Whenever, I try clicking the button it
    fires the itemClick. Even could not get the standard change event
    to work....it seems that only itemClick method operates and the
    click on button fires the itemclick event.
    It would be great if anyone could suggest any workaround.
    Thanks and Regards,
    Paromita

  • Diff between Precalculated Value set and Precalculated web template

    Hi Friends
    Can any one tell the Diff between Precalculated Value set and Precalculated web template
    Where we will use these
    Thanks

    Hi,
    The Reporting Agent is a tool used to schedule reporting functions in the background.
    The following functions are available:
    &#9679;      Evaluating exceptions
    &#9679;      Printing queries
    &#9679;      Pre-calculating Web templates
    &#9679;      Pre-calculating characteristic variables of type pre-calculated value sets
    &#9679;      Pre-calculation of queries for Crystal reports
    go through,
    pre-calculated value sets
    [http://help.sap.com/saphelp_nw04s/helpdata/en/28/734d3caa70ea6fe10000000a114084/frameset.htm]
    [http://help.sap.com/saphelp_nw04/helpdata/en/84/00783b3af21f5ee10000000a11402f/content.htm]
    Pre calculating Web template:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9e/9f653ade969f4de10000000a114084/frameset.htm
    Basically when you have a Precalculated Template, the system first run a report (which has been scheduled) and read the data from there when you run your template. This can imrpove the performance respect to online read data.
    [http://help.sap.com/saphelp_nw04s/helpdata/en/6e/b5663a5fb46752e10000000a11402f/frameset.htm]
    [Pre calculated web template;
    Hope this helps...

  • Sonnet sata E2P or E4P

    Hi,
    i'm planning to buy one of these card to add a 4bay esata enclosure.
    I only need one esata port, so i was going to order the E2P, but on the sonnet site they say that the data transfer rate of E2P is Up to 125 MB per second per port, and for the E4P Up to 300 MB per second per port.
    So why this difference? Maybe they mean the usage of 4 ports for raid?
    I only need an esata port and an enclosure for storage, i just want fast data transfer for archive and backup, but i will not use raid.
    So do you think that the cheaper E2P is ok for me or i'll really miss some performance respect to the E4P?
    Thanks for now.
    Bye

    Have you read up on Port Multiplier yet? some multi drive enclosures support it, where you can have 5 drives and only use one cable. No single drive needs 300MB/sec which is why PM shares bandwith with multiple drives.
    Check out the reviews on http://www.amug.com
    I would spend the extra in case you do want to RAID or run 3+ drives at a later time. For one drive though you only need the 2EP.
    The 2E is 1x while the E4P is a 4x card and more bandwidth.

  • Failed output to a text file

    Please help lookat the code, I am going to create a index file and put strings in it.
    However it is an empty file, why?
    Thanks in advance!
    import java.io.*;
    import java.util.regex.*;
    public class Parse
            public static void main(String args[])
                FileDownload d = new FileDownload();
                d.download(args[0]);
                String f = d.getFileName();
                    if (args.length == 1)
                            try
                                   BufferedReader br = new
                                            BufferedReader(new FileReader(f));
                                    String line;
                                    System.out.println(args[0]);
                                    String SearchTitle = args[0];
                                    System.out.println("The Search results are Saved in the Directory "+SearchTitle);
                                    String s1 = "<a href=\"/w/index.php?title="+SearchTitle+"&oldid=";
                                    while ((line=br.readLine())!=null){
         //searching for interesting occurences and performing respective actions
                                    int i = line.indexOf(s1);
                                    if(i != -1) // a result of -1 indicates the substring wasn't found
                                         File file = new File(args[0],"index.txt");
                                         FileWriter outFile = new FileWriter(file);
                                         BufferedWriter out1 = new BufferedWriter(outFile);
                                         Pattern p = Pattern.compile("oldid=([^\"]*)\"");
                                         Matcher m = p.matcher(line);
                                         if (m.find())
                                               String s2 = m.group(1);
                                               String s3 = "http://en.wikipedia.org/w/index.php?title="+SearchTitle+"&oldid="+s2;
                                               out1.write(s2); //here, failed to write into the file
                                               out1.newLine();                                        
                            catch (Exception e)
                        System.err.println("File input error");
                                    e.printStackTrace ();
                    else
                                    System.out.println("Invalid parameters, please check the argument");
    }

    I didn't actually read your code, but I don't see a call to close() - so that's one possibility. I didn't see any debug either, so if i == 1 you don't write anything either, so that's a possibility. And if m.find() never returns true you don't write anything, so there's another.
    Good luck
    Lee
    PS: I now see your comment - did you get an exception? How do you know you got to that line of code?

Maybe you are looking for

  • Account Assignment in the Purchase order

    Hi I am trying to create Purchase order with Account assignment category "Q"  wherein system displays a GL account (4011100) which is mapped in the OBYC in the transaction GBB and general modification VBR. Further when I enter WBS element, it changes

  • JUST TOO LESS OF RAM ON THE N95

    I have always been a Nokia fan for many years and have always recommended Nokia phones to all my friends. I however bought the N95 and am terribly dissapointed to find that the RAM is totally totally inadequate and one just cannot enjoy the phone due

  • Output Type and Spool!

    Hi! Any ideas, if there is any map between a Output type created under VF02 and a spool processed? For Eg: If I create 3 Output types Z1, Z2 and Z3 and at background 3 Spools are created then how do we isolate what is the spool number for Z1, Z2 and

  • Static Nat and VPN conflict

    Hi I could not quite find any information that was close enough to my problem that would enable me to solve it so hence I am now reaching out to you guys. I have a Cisco ASA running 8.2(1) and I am using ASDM to manage the firewall. I have a Linux VP

  • How to change 2011 as current year in default setting ?

    Dear Experst ! If some can help me in setting 2011 as default current year ? Ejaz