Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Why is my code so slow?

Why is my code so slow?

Scheduled Pinned Locked Moved The Weird and The Wonderful
questioncode-review
9 Posts 8 Posters 51 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Humble Programmer
    wrote on last edited by
    #1

    This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

    Cheers! Humble Programmer ,,,^..^,,,

    A J K M M 5 Replies Last reply
    0
    • H Humble Programmer

      This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

      Cheers! Humble Programmer ,,,^..^,,,

      A Offline
      A Offline
      Albu Marius
      wrote on last edited by
      #2

      That is the better substitute for string.Empty ;P

      I am fighting against the Universe... Reference-Rick Cook

      1 Reply Last reply
      0
      • H Humble Programmer

        This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

        Cheers! Humble Programmer ,,,^..^,,,

        J Offline
        J Offline
        jhwurmbach
        wrote on last edited by
        #3

        Hey - you told that intern to use StringBuilder, because it is presumed to be faster.:cool: :laugh:


        Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
        George Orwell, "Keep the Aspidistra Flying", Opening words

        1 Reply Last reply
        0
        • H Humble Programmer

          This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

          Cheers! Humble Programmer ,,,^..^,,,

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          C# is a mighty tool :rolleyes:

          Greetings from Germany

          1 Reply Last reply
          0
          • H Humble Programmer

            This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

            Cheers! Humble Programmer ,,,^..^,,,

            M Offline
            M Offline
            M dHatter
            wrote on last edited by
            #5

            would of been funnier like this :rolleyes: string EntityID += new System.Text.StringBuilder("").ToString();

            1 Reply Last reply
            0
            • H Humble Programmer

              This one showed up in a code review. 'Nuff said. string EntityID = new System.Text.StringBuilder("").ToString();

              Cheers! Humble Programmer ,,,^..^,,,

              M Offline
              M Offline
              Muammar
              wrote on last edited by
              #6

              Humble Programmer wrote:

              string EntityID = new System.Text.StringBuilder("").ToString();

              string EntityID = new System.Text.StringBuilder("").ToString()**.Replace("", "");** This should make it faster;P


              Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

              D J 2 Replies Last reply
              0
              • M Muammar

                Humble Programmer wrote:

                string EntityID = new System.Text.StringBuilder("").ToString();

                string EntityID = new System.Text.StringBuilder("").ToString()**.Replace("", "");** This should make it faster;P


                Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

                D Offline
                D Offline
                Dan Neely
                wrote on last edited by
                #7

                DEATH TO THE BLINK TAG!!!!!

                -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

                1 Reply Last reply
                0
                • M Muammar

                  Humble Programmer wrote:

                  string EntityID = new System.Text.StringBuilder("").ToString();

                  string EntityID = new System.Text.StringBuilder("").ToString()**.Replace("", "");** This should make it faster;P


                  Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

                  J Offline
                  J Offline
                  Joe Programm3r
                  wrote on last edited by
                  #8

                  string EntityID = new System.Text.StringBuilder("").ToString().Replace("", "").Trim(); Just to remove any errant spaces ...

                  M 1 Reply Last reply
                  0
                  • J Joe Programm3r

                    string EntityID = new System.Text.StringBuilder("").ToString().Replace("", "").Trim(); Just to remove any errant spaces ...

                    M Offline
                    M Offline
                    Muammar
                    wrote on last edited by
                    #9

                    Good morning:rolleyes:


                    Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups