How to insure range check elimination optimization is occurring

I'm wondering if there is a way to tell whether or not the optimizer is employing the range check elimination optimization on a particular loop. Although I'd rather not, I can generate the assembly code via -XX:+PrintOptoAssembly, but I'm not exactly sure what I'm looking for. Any help is greatly appreciated.
I'm also wondering if the range check optimization only occurs for arrays, or if it is used when the object being accessed is a List for example, although once I have an answer to my first question, I can investigate this on my own.
Thanks!

I suspect it's left deliberately unspecified to allow flexibility among versions and platforms, and even within a given run on a given JVM. However, everything I've read strongly suggests that [url http://java.sun.com/developer/technicalArticles/Interviews/devinsight_1/]writing dumb code, such as your basic, standard array loop, will enable that optimization to be performed (as hotspot is specifically tuned to common idioms):
for (int i = 0; i < arr.length; i++) {
  // do stuff that does change the value of i or arr
}Alternatively, using a foreach loop should be expected to generate this kind of code.
As for the bottleneck, is what you're doing in one loop iteration so small that it's reasonable to expect that that operation, plus incrementing i will not dwarf the array bounds comparison? Or have you been able to determine that the check itself is the bottleneck?

Similar Messages

  • How to check APO Optimizer version

    Hi Experts,
    How do we find out the Optimizer version?
    Is it 011?
    I have tried : /n/sapapo/opt09  but it says it doesn't exist.
    Thanks for your help!
    Regards,
    Asad

    Hi Asad,
    Follow the particular steps you will be able to identify the components release versions.
    Hope it will be helpful.
    Regards,
    Kannan

  • HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.

    HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.
    how can we add range selection in screen painter.
    regards.

    Hi,
       create two input fields and a push button like select option in the screeen.
    Try checking this logic
    <b>Program:</b>
    <b>ranges</b> ra_matnr for mara-matnr.
    <b>Layout field name declaration:</b>
    Give the low field name as ra_range-low
      and high field name as ra_range-high.
    extension for pushbutton.--exten(function code)
    next -- function code for the enter key.
    PBO
    module status_3000.
    PAI
    module user_command_3000.
    <b>module user_command_3000.</b>
    if sy-ucomm = exten.
      call screen 400. (screen which shows extension values can be kept).
    elseif sy-ucomm = Next.
    if ra_matnr-low is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    if ra_matnr-high is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    endif.
    endmodule.
    module status_3000.
    read table ra_matnr  index 1 into ra_matnr .
    set pf-status '3000'.
    set title '3000'.
    endmodule
    Br,
    Laxmi.

  • Plz tell me how to create authority check objects and how to usein prg

    dear sir,
    plz tell me how to create authority check objects and how to usein prg

    http://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
    Create custom authorization – Customer specific object
    If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
    Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
    After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
              Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
    AUTHORITY CHECK OBJECT Object_name
                ID fieldname1 FIELD fieldvalue1
                ID fieldname2 FIELD fieldvalue2
                ID fieldname3 FIELD fieldvalue3.
                 If sy-subrc eq 0.   "Authorization exists
                 Endif.
    http://articles.techrepublic.com.com/5100-6329_11-5110893.html
    Edited by: JackandJay on Jan 16, 2008 10:21 AM

  • Disabling range checking during array access.

    I believe there should be a way to accomplish the above via some javac option.
    Context: I'm writing a pure Java-based volume renderer (i.e., no JNI), with emphasis on speed. I'm not happy with the fact that even though I can trivially guarantee legal array indices to my 3D-array accesses (say, via outer for-loops covering the volume extents... a construct I can't escape anyways in the context of my application), Java continues to distrust my programming abilities and goes on 'needlessly' performing range checking for me!
    I fully appreciate the fact that in 99% of the cases, most developers would want it the way we have it currently. However, the language should not constrain everybody unnecessarily all the time.
    Anyone, any insights on how to work this around (in Java)? Thanks!
    Harry

    >
    Anyone, any insights on how to work this around (in
    Java)? Thanks!Short of writing your own VM implementation this won't be happening.
    Alternatively you can change your approach in a way that this is not a bottleneck for you.
    But honestly this question has come up before and while you may not want to hear it the short answer is no. So I would recommend you look in a different direction to solve your problem.

  • Pl sql Code To count how max checkboxes are checked In the Report Region

    I am developing a APEX report where I put check boxes to row row of the report result . So I checked Some of this check box. Now I need a code to count how many checkboxes are checked during the runtime

    there is a forum for APEX: Oracle Application Express (APEX)

  • How to name the Check Box as "Want Free Gift" using PARAMETERS statements

    Hi all,
    I am new to check boxes. I have a existing report where I have to add a check box to the selection screen.
    So i said
    PARAMETERS: p_cncldc AS CHECKBOX.
    everythibng is fine and I get the check box on the selection screen. when i execute the report i get the name of check box as p_cncldc. but i want the name of the check box as "Want Free Gift".
    How to name the check box as "Want Free Gift".
    if i am saying
    PARAMTERS: Want Free Gift AS CHECKBOX. it says a syntax error saying it canot be more that 8 chars.
    Some one please help. I am new to Check boxes
    Regards,
    Jessica Sam
    Edited by: jessica sam on Mar 31, 2009 10:37 PM

    Text on the Right hand side of check box.
    selection-screen begin of block b1.
    selection-screen begin of line.
    parameters: w_check as checkbox.
    selection-screen: comment  4(30) TEST .
      selection-screen end of line.
    selection-screen end of block b1.
    INITIALIZATION.
    test = 'Want Free Gift AS CHECKBOX'.
    Text on the Left hand side of check box.
    selection-screen begin of block b1.
    selection-screen begin of line.
    selection-screen: comment  2(30) TEST .
    parameters: w_check as checkbox.
      selection-screen end of line.
    selection-screen end of block b1.
    INITIALIZATION.
    test = 'Want Free Gift AS CHECKBOX'.
    OR:
    GOTO(Menubar)>Text Elements>Selection Texts
    Regards,
    Gurpreet

  • How to use ranges?

    Hi all,
    can any body explain how to use ranges?  i used like below..
    but im not getting pls  correct it...
    RANGES : HKONT FOR BSEG-HKONT.
    DATA : WA_HKONT LIKE LINE OF HKONT.
    START-OF-SELECTION.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725140'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725120'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725110'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725190'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725130'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725160'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725180'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725150'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    WA_HKONT-SIGN = 'I'.
    WA_HKONT-OPTION = 'EQ'.
    WA_HKONT-LOW = '10725170'.
    WA_HKONT-HIGH = ' '.
    APPEND WA_HKONT TO HKONT.
    CLEAR WA_HKONT.
    and in select quer i have used like this.
    SELECT BUKRS
           BELNR
           GJAHR
           BUZEI
           HKONT
           LIFNR
           DMBTR
           KTOSL
           WERKS
           SEGMENT
           FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_BSEG
           FOR ALL ENTRIES IN IT_BKPF
           WHERE BUKRS = IT_BKPF-BUKRS
           AND   BELNR = IT_BKPF-BELNR
           AND   GJAHR = IT_BKPF-GJAHR
           AND   LIFNR IN S_LIFNR
           AND   WERKS IN S_WERKS
           AND   HKONT IN HKONT
          AND    KTOSL = 'FR1'
           AND   SEGMENT IN S_SEGM.
    pls  help...

    Hi Sameer,
    Let me share my solution with you.
    try with this....
    RANGES : HKONT FOR BSEG-HKONT.
    INITIALIZATION.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725140'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725120'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725110'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725190'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725130'.
    APPEND  HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725160'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725180'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725150'.
    APPEND HKONT.
    CLEAR HKONT.
    HKONT-SIGN = 'I'.
    HKONT-OPTION = 'EQ'.
    HKONT-LOW = '10725170'.
    APPEND  HKONT.
    CLEAR HKONT.
    Hope this helps you. Reply for queries, shall post the updates.
    Regards. 
    Kumar.

  • How to activate the Check box in Purchase Order after Goods Receipt

    Hi All,
    How to activate the check box after Goods receipt of Purchase order in Item view (Goods Receipt is completed).
    Where t make the settings in SPRO.
    Regards,
    Shailendra Hadkar

    Hi
    SPRO - SAP IMG- Material management - Inventory management and physical inventory - Goods receipt - create purchase order automatically - activate auto Po creation for movement type.
    Then activate the auto PO creation in Vendor master - Purchasing view
    Check it out.
    Regards,
    raman

  • How to handle the check box in the alv tree display

    Hello,
    in my ALV Tree Report i have a check box in the output.
    I have one check box in the selection screen as select all .
    if this is selected then all the check boxes in the output must be selected that is (X).
    am using CL_GUI_ALV_TREE  for this.
    Please give me some input how to make that check boxes 'X' in the above mentioned case.
    With Regards,
    Sumodh.P

    Sumodh,
    check this
    Re: Select all checkbox in ALV tree
    please search before posting
    Thanks
    Bala Duvvuri

  • How do you spell check a field?

    How are people spell checking their fields?
    In searching around, I have only found (a) suggestions to yank the text into MS Word, do a spell check, then yank the resulting text into the field; (b) software from DC AL CODA that we aren't clear how they actually work (http://www.dcalcoda.com).
    Specifically, my manager wants a tool that'll interface with Oracle like this: give a table name and a field name and be asked about each spelling error, much like an email spell check. The tool would change things as you ask, directly in the database. You wouldn't have to cut and paste into it and back to the db fields.
    We aren't using forms. We use SQL*Plus, Quest Software's TOAD, and our own Java servlets (using JDBC to enter SQL statements).
    I would love to hear how people do their spell checking.
    Hopefully this is an appropriate forum for this question. There doesn't seem to be a general or SQL forum. Our database tables include a fair amount of text that shows up on Web pages. These are the fields we want to spell check.

    I thought I'd reply to my own question since I found a workable solution, at least for our office which has MS Windows.
    MS Access can connect directly to an Oracle data source. Access has a spell checking feature where you can select a field and spell check it. Below are tips and instructions for doing this.
    TIPS:
    It's surely a good idea to back up tables and be the only person or process changing those tables during the spell check.
    One thing to watch for is whether the entire table comes in. At the bottom of the screen is a >* button which seems to get all fields. For large tables, you have to hit this button before you get the entire table.
    Another glitch is that all of the given database user's tables show up in one list box -- makes for some painful scrolling, but all of the tables are listed.
    A much smaller glitch is that if you widened any of the fields in the view of the table, when you close the window, it asks if you want to save the formatting. It has nothing to do with saving the data (that is automatic). It's safe to say no.
    The spell check doesn't recognize HTML tags (asks about "br"s from <br> tags) but seems to know to ignore things like &quot;
    How to set up an ODBC Data Source in Windows:
    1. MS Start -> Settings -> Control Panel -> ODBC Data Sources (32 bit)
    2. Drivers tab, scroll down and select Oracle ODBC Driver
    3. OK
    4. User DSN tab, Add...
    5. Select Oracle ODBC Driver and Finish
    6. Make up a data source name (example: src)
    7. Enter a description for it
    8. For Service name, put what your service name is (for an SQL*Plus connection, 'usr/passwd@svc', this is 'svc')
    9. For UserID, put your user id (for an SQL*Plus connection, 'usr/passwd@svc', this is 'usr')
    10. Ignore the rest of the fields, click OK
    11. Another OK.
    How to use Access to Spell Check an ODBC Data Source Field:
    0. Install Access from (MS Office 2000).
    1. Start Access (by the way, you might find it way down the list in Start -> Programs).
    2. Open file, in the file type box, scroll to the end: ODBC Databases. You'll get a dialog.
    3. Machine Data Source tab, select the name you gave it (src in step 6 above)
    4. You'll be prompted for the password (for an SQL*Plus connection, 'usr/passwd@svc', this is 'passwd')
    5. Select from the huge list of every table the table you want. Ok.
    5.a. If the table has no key, you'll be prompted for the unique key from a list of all fields.
    6. Double click the item that has just been added to the dialog that remains on the screen. It'll have a globe next to text like USR_TABLENAME. This brings up a randomly sized first chunk of the table.
    7. To make sure you get the entire table, on the paging buttons on the bottom (|< < > >| >*), click >*. It may take a few moments to get a huge table.
    8. Click the heading of the field (column) you want to spell check). This selects the entire column.
    9. Hit spell check (ABC checkmark tool or Tools -> Spelling)
    10. Check away. The changes are made immediately to the database.
    11. Close the table display window.
    null

  • How to get a check box on the selection screen

    Hi all
    can any body tell me how to get a check box on the selection screen

    parameter: pa_check   as checkbox.
    To define the input field of a parameter as a checkbox, you use the following syntax:
    PARAMETERS <p> ...... AS CHECKBOX ......
    Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
    If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
    REPORT DEMO.
    PARAMETERS: A AS CHECKBOX,
    B AS CHECKBOX DEFAULT 'X'.

  • How to default a check box?

    Hi,
      How to default a check box?
    Regards,
    Jaya

    Hi
    DATA :
       w_c type c value 'X'.
    WRITE :
       w_c as CHECKBOX , 'XYZ'.
    Regards
    Pavan

  • How to keep a check box in script

    hi
    how to keep a check box in script

    Hi,
    go to sapscript editor
    Change the editor to 'PC Editor' and take the menu.
    Include -> Characters -> SAP Symbols
    whether this will not be visible in the print preview.
    other wise..
    Just keep it like <697> in your text element.
    Telephone <697> : &W_TAB-TEL&
    Corresponding symbol will be printed in the paper.
    Note: It will not be displayed in the print priveiw.
    Regards,
    Shiva k

  • How to create a check box that can be unchecked

    How do I create check boxes that can be checked and the unchecked in Forms Central?
    For example, if you accidentally check a box - you want to uncheck it. Right now it doesn't allow you to do that.
    please help.
    Thanks
    Gen

    Are you sure you're not using radio buttons? Check boxes behave the way you'd expect for me with a form generated by FormsCentral.
    I'm going to move this to the FormsCentral form since the team there may want to take a look at the form.

Maybe you are looking for

  • IPod not being recognized by iTunes or Windows XP

    I just got a ipod nano for my birthday and I've been trying to set it up for two days, I've got the latest version of Itunes and I've tried everything I could think of and my Ipod is still not being detected by my computer or iTunes. When I plug it i

  • WBS element group  in Report Painter

    Hi, What is the procedure to insert WBS element group as parameter selection field in a report painter? I'm working in PS Information System / Hierachy Reports and we want to extract economic information Thanks! Sayaton

  • ITunes not opening with message that it can't find or create iTunes folder

    Out of the blue,since downloading latest version of iTunes to Windows XP, it now says it can't find or create the iTnes folder in My Music. The files were there. Backed up songs to external drive and uninstalled iTunes and then re-downloaded software

  • Image in Graphic

    how can i draw an image in a component and how can i draw an image instead of a graphic please help, i'm turning around

  • Installing 8i Personal Edition

    I am installing Oracle 8i Personal Edition on windows 98 and I ran into a problem. I couldn't install the Database Configuration Asistant. The log reads: Documents\Downloads\Oracle8i\starterdb is an invalid command line argument So it is looking in D