Which one will get better performance when traversing an ArrayList,  iterat

hi, everyone,
Which one will get better performance when traversing an ArrayList, iterators, or index(get(i))?
Any reply would be valuable.
Thank you in advance.

Use the iterator, or a foreach loop, which is just syntactic sugar over an iterator. The cases where there is a noticeable difference will be extremely rare. You would only use get() if you actually measured a bottleneck, changed it, re-tested, and found significant improvement. An iterator will give O(n) time for iterating over any collection. Using get() only works on Lists, and for a LinkedList, gives O(n^2).

Similar Messages

  • File Adapter or File  Transport which one will give more performance

    Hi all,
    File Adapter or File Transport which one will give more performance ? in OSB?
    Which one to select any one did performance analysis?
    Thanks
    Phani

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • I have a macbook pro 13" early 2011 version and what to install windows 7 on it via bootcamp but not sure that whether to install x64 or x86 version? which one will work better

    i have a macbook pro 13" early 2011 version and what to install windows 7 on it via bootcamp but not sure that whether to install x64 or x86 version? which one will work better

    There is no need for anyone to use 32-bit version anymore.
    Retail comes with both. Or you can save on just buying 64-bit System Builder disc.
    Better support for today's hardware with larger video graphic memory and systems.
    Better memory management.

  • Which one will have better career (BW+BODS) or (BO+BODS).

    Hi All,
    I want to know which career path will have better roadmap for next 10 years, (BW+BODS) or (BO+BODS). I have started my career with BW, and now I am planning to to learn some other SAP Module,i.e addon to BW, which will progress my career.
    Can anyone suggest me that is my Idea of learning BODS will help me or not? If not please suggest me some other path..
    Regards,
    G S Ramanjaneyulu.

    Hi Rama,
    Why do you want to restrict yourself on learning on this combination.  My colleagues all are BW, BODS and BO Consultants.  If any project require specific, they split depends on the project or whichever they want learn more.
    Nowadays, it is very common for consultants that they know two or three modules or systems.
    You already know SAP BW... so learn BO next and then BODS or whichever you like.
    BO is very good in Market currently on Dashboard and Analytical.
    Regards
    GGOPII

  • Which clause will yield better performance?

    I've always been wondering from a performance standpoint if it was better to use a WITH clause withing a cursor or if it was better to use a sub query? So, if say, I could either place my sub query in the FROM clause of my cursor (for this example that would be the case) or use a WITH clause, which would yield better performance? (I'm using Oracle 11g)

    Check this link.
    http://jonathanlewis.wordpress.com/2010/09/13/subquery-factoring-4/
    Regards
    Raj

  • Which one will give more power C2D 2.93 vs i5 2.4

    Any one can inform me which one will give more performance MBP C2D 2.93 with NVIDIA GeForce 9400M + 9600M GT with 512MB or MBP i5 2.4 with 330M 256MB
    I want it for photos and movies editing ?

    Why don't you just go read some benchmarks?
    http://www.barefeats.com/mbpp18.html

  • Same algorithm in function and procedure then which one will better?

    Why pl sql function is better to computes a value instead of procedure?
    If I apply same algorithm in function and procedure then which one will perform better?

    It's not a matter of performance, it is more a matter of how it is going to be used.
    A function can be used as an expression in an assignment or in a query.
    my_var := my_func(my_param);
    select my_var(my_col) from my_table;But it can just return a single value (which can be a complex value like a nested table or object or ref cursor, but still a single value.)
    The procedure often is more used to perform an action that does not return anything.
    execute_invoicing(my_invoice_id);Or procedures can be used if you need multiple return values.
    my_proc(my_input, my_output_1, my_output_2, my_output_3);But the procedure cannot be used in an assignment expression or a select query.
    Performance wise procedures and functions are completely identical. It is only a matter of what action they perform and how you are going to use them.

  • What MacBook Pro will I get better performance with the 2.4ghz 256 SSD or the 2.6ghz 128 SSD these are also refurbished models

    I'll wanting to buy one of these these are refurbished and cannot choose please help me thanks :)

    Refurbished 13.3-inch MacBook Pro 2.4GHz Dual-core Intel i5 with Retina Display
    Originally released October 2013
    13.3-inch (diagonal) Retina display; 2560-by-1600 resolution at 227 pixels per inch
    8GB of 1600MHz DDR3L SDRAM
    256GB Flash Storage1
    720p FaceTime HD camera
    Intel Iris Graphics
    Apple Certified Refurbished
    OR
    Refurbished 13.3 inch MacBook Pro 2.6Ghz Dual-Core Intel i5 with Retina
    Originally released October 2013
    13.3-inch (diagonal) Retina display; 2560-by-1600 resolution at 227 pixels per inch
    8GB of 1600MHz DDR3L SDRAM
    128GB Flash Storage1
    720p FaceTime HD camera
    Intel Iris Graphics
    Apple Certified Refurbished
    Which one is the better one, they are the same  price what one will run faster and what one would you buy
    Many Thanks :)

  • How to setup airport time capsule to get better performance?

    I need to set up my wireless system with my new Airport time capsule 3T as primary base station to get better performance, and  If I have a cable modem  as primary device to get the signal (5MB) from the ISP then my network has one, Macbook pro, Macbook air, mac mini, 2 ipad's, 2 iphones, but neither of them is connected all time.
    What is the best way to do that?
    What wifi channel need choose to?

    What is the best way to do that?
    Use ethernet.. performance of wireless is never as good as ethernet.
    What wifi channel need choose to?
    There is no such thing as the best channel..
    Leave everything auto.. and see if it gives you full download speed.
    Use 5ghz.. and keep everything up close to the TC for the best wireless speed.
    If you are far away it will drop back to 2.4ghz which is slower.
    Once you reach the internet speed nothing is going to help it go faster so you are worrying about nothing.

  • Which one is the better cover for protection on tje ipad mini with retina

    I  bougth an mini ipad with retina, my 5 years old will use using too. Which one is the better cover for protection?

    You'll have to think in terms of a shell rather than just a cover. Main problems are dropping and liquid getting inside. Plus a shell can add a bit of extra heft and "grippability", aiding little hands in holding on the slippery aluminum back. Can add some sort of screen protector to prevent scratches, though that will reduce sensitivity to an extent; however, a direct blow will inevitably shatter the Gorilla Glass.
    That being said, I am very happy with the Lifeproof Nüüd case that has protected mine from the get-go. Decided to forego screen protectors in lieu of better touch performance; almost 2 years down the road the screen is still scratch free.
    iPad 4th Gen, iOS 7.1.2, 64GB, White

  • We have many mappings, which one is good in performance wise ?

    We have many mappings, which one is good in performance wise ?

    HI
    Different Mapping Techniques are available in XI. They are: Message Mapping, XSLT Mapping, Java Mapping and ABAP mapping.
    u2022The integration repository includes a graphical mapping editor. It includes built-in functions for value transformations and queue and context handling.  There is an interface for writing user-defined functions (java) as well.
    u2022XSLT mappings can be imported into the Integration Repository; java methods can be called from within the XSLT style sheet. Advantages of this mapping are: open standard, portable, extensible via Java user-defined functions.
    u2022If the transformation is very complex, it may be easiest to leverage the power of Java for mapping.
    u2022ABAP mapping programs can also be written to transform the message structures.
    Message Mapping
    SAP XI provides a graphical mapping tool that generates a java mapping program to be called at run time.
    u2022Graphically define mapping rules between source and target message types.
    u2022Queue-based model allows for handling of extremely large documents.
    u2022Drag-and-drop.
    u2022Generates internal Java Code.
    u2022Built-in and user-defined functions (in Java)
    u2022Integrated testing tool.
    u2022N:M mapping is possible.
    JAVA MAPPING:
    Usually Java mapping is preferred when the target structure is relatively complex and the transformation cannot be accomplished by simple graphical mapping.
    For e.g. consider a simple File->IDoc scenarion where the source file is a simple XML file, whereas the target file is an IDoc with more than one hierarchy level e.g FINSTA01. Content conversion in XI can only create a single level hierarchy, so in this scenario a Java mapping would come in handy.
    See these:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
    When to use Java mapping
    1) Java mapping are used when graphical mapping cannot help you.
    Advantages of Java Mapping
    1)you can use Java APIs and Classes in it.
    2) file look up or a DB lookup is possible
    3) DOM is easier to use with lots of classes to help you create nodes and elements.
    Java mapping can be used when you have complex mapping structures.
    ABAP MAPPING:
    ABAP mappings are mapping programs in ABAP objects that customers can implement using the ABAP Workbench.
    An ABAP mapping comprises an ABAP class that implements the interface IF_MAPPING in the package SAI_MAPPING. The interface has a method EXECUTE with the some signature.
    Applications can decide themselves in the method EXECUTE how to import and change the source XML document. If you want to use the XSLT processor of SAP Web AS, you can use the ABAP Workbench to develop a stylesheet directly rather than using ABAP mappings.
    In ABAP mapping you can read access message header fields. To do this, an object of type IF_MAPPING_PARAM is transferred to the EXECUTE method. The interface has constants for the names of the available parameters and a method GET, which returns the respective value for the parameter name. The constants are the same as in Java mappings, although the constant MAPPING_TRACE does not exist for ABAP mappings. Instead, the trace object is transferred directly using the parameter TRACE of the method IF_MAPPING~EXECUTE.
    For more details refer
    http://help.sap.com/saphelp_nw70/helpdata/EN/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ABAP Mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Re: Performance of mappings (JAVA, XSLT, ABAP)
    XSLT Mapping
    XSLT stands for EXtensible Stylesheet Language Transformations. It is an XML based language for transforming XML documents into any other formats suitable for browser to display, on the basis of set of well-defined rules.
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    The above menotined are the mapping present in the XI.
    When it is critical and complicate we go for the ABAP,JAVA or XSLt mapping. For simple Mapping we go for the graphical mapping.
    the selection of mapping also depends upon the requirement and alos on our scenario.
    cheers

  • Which server will get the load?

    Hi all
    I have 2 servers, on 'server1', I have an flv file, on
    'server2', I have an swf file.
    The swf file on server2 loads the flv file on server1. My
    question is, which server will get the burden of the load of the
    flv file? Additionally, how can I test this to confirm this (bare
    in mind, I'm not a server guy).
    Any help is always appreciated.
    Thanks
    Chris

    You can basically publish it to one Origin Server and that server will republish the incoming stream to other 3 origin servers. This feature is called Multi-point publish. Basically you use application.onPublish and onUnpublish handlers in conjunction with Server-side NetStream Class to achieve this.
    Simple example:
    var nc;
    var ns;
    application.onAppStart = function(){
          nc = new NetConnection();
         nc.onStatus = function(info){
              // you can trace connection status here
         nc.connect("rtmp://Origin_Server_2/myApp");
    application.onPublish = function(myClient,myStream){
        ns = new NetStream(nc);
        ns.attach(myStream);
        ns.publish(myStream.name,"live");
    application.onUnpublish = function(myClient,myStream){
          ns.publish(false);

  • I have a Apple MacBook Pro "Core i7" 2.8 13" Late 2011. i want to upgrade its RAM from 4GB to 16GB. But OWC sells two kinds of RAM, the DDR3 and the DDR3L.What is the different and which one would work better for my mac. Thanks!!!

    Please help! I have a Apple MacBook Pro "Core i7" 2.8 13" Late 2011. i want to upgrade its RAM from 4GB to 16GB. But OWC sells two kinds of RAM, the DDR3 and the DDR3L.What is the different and which one would work better for my mac. Thanks!!!

    I don't see any DDR3L on the page for the RAM that would fit your model -> http://eshop.macsales.com/shop/memory/Apple_MacBook_MacBook_Pro/Upgrade/DDR3_133 3MHz_SDRAM.
    But the answer is that it doesn't really matter - just make certain to get 1333MHz.
    Good luck,
    Clinton
    MacBook Pro (15-inch Late 2011), OS X 10.??, 16GB Crucial RAM, Crucial M500 960GB SSD, 27” Apple Thunderbolt Display

  • TV on my MacBook, living in Ireland, which one to get?

    Hi All,
    I want to watch TV on my MacBook, but I dont know if any off them will work, Elgato was the ones I was looking at. We have a satellite dish on the roof and have the digital sky box in the TV room, we dont have an aerial anywhere and only get very bad reception on the Irish stations, which I presume are decribed as analogue, are they? Antway what do I need to get TV on the MacBook? Anyone have it in Ireland? Im in Kildare.

    The Elgato tv tuners are excellent but which one to get depends on your TV reception. You need to find out if you can get Digital Freeview in your area. I can recommend the EyeTV Hybrid which is good for analogue and digital. The EyeTV Diversity great if you can get Digital but pointless if not.
    Whatever you do you're going to need a decent arial if the reception is bad in you area.

  • So i have 29 albums and my computer says it has 2.55gb on the itunes, and im planing on getting a iphone 5 that has 16gb or 32gb and idk which one to get? Can someone please help me out!!!!!!!!!!!

    So i have 29 albums and my computer says it has 2.55gb on the itunes, and im planing on getting a iphone 5 that has 16gb or 32gb and idk which one to get?  Idk but i just need to know how much storage  that can hold 2.55 gb of albums and rest of the apps and pic i gonna put on this iphone 5 im getting! please help!!!!! (16gb or 32gb?) If maybe can i get some tips about Storage!

    I certainly owuld not get the 16 Gb.  My old phone had 32 Gb and it was pretty much full.  I just depends on what you wan tto place on it in the way music, apps, videos etc

Maybe you are looking for