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. General Programming
  3. C#
  4. I need critique on this code

I need critique on this code

Scheduled Pinned Locked Moved C#
data-structuresregex
21 Posts 5 Posters 0 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.
  • P PIEBALDconsult

    Yes, but the additional method calls could become a bottleneck in a tight loop. And the resultant code could be even less readable. You need to examine each case on its own.

    A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #21

    I'd say it's probably unlikely, as the JIT compiler is able to inline function calls. In any event, if it's a tight loop, it seems pretty weird that there would be a region in the code anyway, in which case a method call would also seem unnecessary to break out the logic. And my point was that if you are thinking of making a region in your method, it's probably because your are trying to compress a bunch of code into a smaller block and that is usually better done with a method call.

    [Forum Guidelines]

    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