GeekRoom.Tech
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 months ago

timeoutSort

lemmy.ml

message-square
8
link
fedilink
  • cross-posted to:
  • [email protected]
79

timeoutSort

lemmy.ml

☆ Yσɠƚԋσʂ ☆@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 months ago
message-square
8
link
fedilink
  • cross-posted to:
  • [email protected]
alert-triangle
You must log in or register to comment.
  • owenfromcanada@lemmy.ca
    link
    fedilink
    arrow-up
    16
    ·
    2 months ago

    How does a programming joke cause me physical pain?

  • LadyMeow@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    6
    ·
    2 months ago

    I mean, it’s basically O(1), right? :p

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      13
      ·
      2 months ago

      I mean, it does scale with the size of the input. Just not with the count of inputs, but rather the size of each input element.

      • jimmux@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        2 months ago

        Or just the size of the largest input?

    • marduk@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      ·
      1 month ago

      O(shit)

  • limer@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    2 months ago

    If it is stupid and it works it’s not stupid.

    I’m going to use it

  • Vinapocalypse@lemmy.ml
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    1 month ago

    PR:

    -  setTimeout(() => console.log(item), item)
    +  setTimeout(() => console.log(item), Math.log(item))
    

    Comment: This will speed up sort time greatly. However, sort order may become erratic for longer lists, and lists with numbers less than 1

  • Cat_Daddy [any, any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    snortle

Programmer Humor@lemmy.ml

programmerhumor@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 163 users / day
  • 867 users / week
  • 2.21K users / month
  • 7.12K users / 6 months
  • 1 local subscriber
  • 39.5K subscribers
  • 806 Posts
  • 3.81K Comments
  • Modlog
  • mods:
  • cat_programmer@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org