Results 1 to 2 of 2

Thread: String Concatination

  1. #1
    Ext User
    Join Date
    Mar 2007
    Vote Rating

    Default String Concatination

    In the source code i came across a couple of string concatinations using +.
    It would be nice if these are changed to using the array.join() as we gain much better performace.

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Austin, Texas
    Vote Rating


    Actually, this is a common misperception. Array.join() is always more efficient AFTER a certain point, but for a few values, the concatenation operator is actually faster (and more convenient of course):

    When the number of values being concatenated is small enough the concatenation operator still wins. The cross-over point is not entirely deterministic, but exists somewhere in the neighborhood of 7-13 values. For larger strings the count may be much smaller.

Similar Threads

  1. Open tab using url and query string.
    By valc in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 10 Jan 2007, 10:36 AM
  2. how to set different string in the ContentPanel title &
    By davy_wei in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 7 Jan 2007, 7:08 PM
  3. Date string cannot be formatted
    By qiuyl in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 12 Dec 2006, 6:59 AM
  4. DataModel.query() For A 0-Length String
    By thejoker101 in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 17 Nov 2006, 8:49 AM
  5. Add query string parameter into DataModel
    By kovtik in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 3 Oct 2006, 5:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts