• Home
  • About

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
By using Twitter’s services you agree to our Cookie Use and Data Transfer outside the EU. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.
charliesome's profile
Charlie Somerville
Charlie Somerville
Charlie Somerville
@charliesome

Charlie Somerville

@charliesome

karaoke fiend and fox enthusiast

Joined September 2008
  • © 2016 Twitter
  • About
  • Help
  • Terms
  • Privacy
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @

Retweet this to your followers?

Optional comment for Retweet
 
 

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
140

Are you sure you want to delete this Tweet?

Promote this Tweet

Block

  • Add a location to your Tweets

    When you tweet with a location, Twitter stores that location. You can switch location on/off before each Tweet and always have the option to delete your location history. Learn more

    Profile summary

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Your reply includes the people in this conversation up to this point. Learn more

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    Preview

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Buy Now

    Hmm... Something went wrong. Please try again.

    Previous Tweet
    1. Jaiden Mispy ‏@m1sp 15 Oct 2014

      First time I've hit the string concatenation issue in Ruby. This wastes ~1g of memory for a 600k character input:pic.twitter.com/8v1tz9Tdtr

      2 retweets 7 likes
      Charlie Somerville ‏@charliesome 15 Oct 2014

      @m1sp fun fact: this isn't an issue in CPython because it can cheat and do an in-place append if the left hand side's ref count is 1

      • Retweet 1
      • Jaiden Mispy
      11:35 PM - 15 Oct 2014
      1 retweet 0 likes
        1.  ☀ ⛱ eevee  ⛱ ☀ ‏@eevee 15 Oct 2014

          @charliesome @m1sp uhhhh even if it didn't, you should only have two copies of each string live at any given time, htf does that get to 1g

          0 retweets 0 likes
        2. Charlie Somerville ‏@charliesome 15 Oct 2014

          @eevee @m1sp MRI has a tracing GC that only runs every so often, so unreferenced string objects pile up until the next GC run

          0 retweets 0 likes
        3.  ☀ ⛱ eevee  ⛱ ☀ ‏@eevee 15 Oct 2014

          @charliesome @m1sp whoops well then this isn't an issue in CPython because it's mostly refcounted 8)

          0 retweets 0 likes
        4.  ☀ ⛱ eevee  ⛱ ☀ ‏@eevee 15 Oct 2014

          @charliesome @m1sp but string building by concatenation is O(nm) so you shouldn't be doing it anyway tsk tsk

          0 retweets 1 like
        5. Jaiden Mispy ‏@m1sp 15 Oct 2014

          Array#join is faster than either form of concatenation, as @eevee points outhttp://stackoverflow.com/a/23555375/1983739 …

          1 retweet 0 likes
        6. Charlie Somerville ‏@charliesome 15 Oct 2014

          @m1sp that's a bad benchmark, the Array#join case is only faster because it runs less Ruby code and allocates fewer objects

          0 retweets 1 like
        7. Charlie Somerville ‏@charliesome 15 Oct 2014

          @m1sp Array#join uses a loop and String#<< internally (although it calls the C function for #<< directly rather than making a method call)

          1 retweet 1 like
        1. Jaiden Mispy ‏@m1sp 16 Oct 2014

          @AndreaFaulds @charliesome and there is no such branching to be found in the Ruby equivalent, yep ^^ https://github.com/ruby/ruby/blob/trunk/string.c#L1444 …

          0 retweets 0 likes
        2. Show more
      1. Chris Siebenmann ‏@thatcks 15 Oct 2014

        @m1sp @charliesome In CPython not all strings are expandable that way. In practice it's a chancy optimization and you shouldn't count on it.

        0 retweets 1 like
      2. Chris Siebenmann ‏@thatcks 15 Oct 2014

        @charliesome @m1sp A 2005 view of the CPython 2.4 situation is http://utcc.utoronto.ca/~cks/space/blog/python/ExaminingStringConcatOpt … . I'm sure there's been changes since for eg Unicode.

        0 retweets 0 likes

      Loading seems to be taking a while.

      Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

        Promoted Tweet

        false

        • © 2016 Twitter
        • About
        • Help
        • Terms
        • Privacy
        • Cookies
        • Ads info