Low-Level JavaScript Performance Best Practices (Crash Course)

Поділитися
Вставка
  • Опубліковано 23 гру 2024

КОМЕНТАРІ •

  • @W1ngSMC
    @W1ngSMC 4 місяці тому +2

    I'm pretty sure JS strings are pooled so only the pointers to the actual c strings are compared. (V8 for sure pools constant strings you declare with "...")
    That is a reason you can't just set some nth character in the string, like in C.

  • @klarafall4281
    @klarafall4281 5 місяців тому +1

    Good examples. Also keeping the folder view open actually helps understanding what currently explained. 👌

  • @bombardo2489
    @bombardo2489 6 місяців тому +5

    man this exactly what i needed. could you spoil us further and make us video about user auth on enterprise level that would be sick

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries  6 місяців тому

      Happy to hear, mate! I'll put that on my list 😉

    •  6 місяців тому

      This one sounds really good

  • @NathanielBabalola
    @NathanielBabalola 6 місяців тому

    Thank you, can you please drop the links to the jsbenchmarks ?

    • @SoftwareDeveloperDiaries
      @SoftwareDeveloperDiaries  6 місяців тому

      Unfortunately they are not persisted, but you can find the approx. results in the original article linked in the description

  • @trontrontrontron4
    @trontrontrontron4 7 днів тому

    this is great, really love the quality of the video. my only comment would be to be judicious when trying to optimize, for example many of the tricks here you can find in the typescript compiler (shallow objects to make the property access path short, using ints instead of strings for enums, fixed shapes for the objects, etc) but thats because they are trying to squeeze every oz of performance out this shitty language,
    in everyday app design and work architecture matters a lot more, like avoiding doing unnecessary work and using the right data structures.
    but this shitty language can do a lot right off the bat, i abuse string.join everyday all day.

  • @gamingwolf3385
    @gamingwolf3385 6 місяців тому

    I was waiting for this video , thank you a lot
    I am learning C# , i see some new concepts like domain entity , value objects and this stuff , can you explain hiw to do it in node ?

  • @adwaitbokade2890
    @adwaitbokade2890 5 місяців тому

    Magnificent !!

  • @repenning1
    @repenning1 Місяць тому +1

    "Premature optimization is the root of all evil" - Donald Knuth. Why would you bother rewriting arguably more readable code (e.g., the array method example)? First of all, an improvement of, say, 38% in most use cases is quite pointless unless you are having a hard constraint such as 16ms FPS rendering budget. Second, the performance gain, if there even remains one, may be gone with the next version of JS engines. In short, stick to the more readable and more maintainable code and only optimize if there is an actual reason to do so.

  • @prashlovessamosa
    @prashlovessamosa 6 місяців тому

    Great

  • @Serjgap
    @Serjgap 6 місяців тому +2

    Speed optimization advices here are ok, but code style is very bad and inconsistent. You should have cleaned it up a bit instead of directly copying the article

  • @GoetzGehgetz
    @GoetzGehgetz 6 місяців тому

    t-10 ;)

  • @_Greenflag_
    @_Greenflag_ Місяць тому

    This is ok for a general knowledge, but this is (and should be) useless in programming. Yes, due to how things have been build, there is a difference of performance of objects "not having the same shape" but nobody (or there is a code problem) will do some 1 million iterations on an array or objects. So build readable and concise code instead of some esoteric performance optimisation.

  • @HardikRudra-g3m
    @HardikRudra-g3m 5 місяців тому

    Great