home.social

#memoization — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #memoization, aggregated by home.social.

fetched live
  1. 🚀 Ah, yes, the riveting world of dynamic programming with Σ-types in Lean—because who wouldn't want to verify their #memoization techniques while sipping on a nice cup of existential dread? 🤓 If you thought solving recursive #algorithms was thrilling, just wait until you read about turning it into a 17-minute snooze-fest! 💤
    tannerduve.github.io/blog/memo #dynamicprogramming #Σtypes #Lean #existentialdread #HackerNews #ngated

  2. 🚀 Ah, yes, the riveting world of dynamic programming with Σ-types in Lean—because who wouldn't want to verify their #memoization techniques while sipping on a nice cup of existential dread? 🤓 If you thought solving recursive #algorithms was thrilling, just wait until you read about turning it into a 17-minute snooze-fest! 💤
    tannerduve.github.io/blog/memo #dynamicprogramming #Σtypes #Lean #existentialdread #HackerNews #ngated

  3. Between immutability and memoization, you might have to choose, by Rémy Hannequin
    thoughtbot.com/blog/between-im

    Freezing objects, pre-computation, cache, #memoization.. which one you can use, when it's worthy?

    #ruby

  4. Between immutability and memoization, you might have to choose, by Rémy Hannequin
    thoughtbot.com/blog/between-im

    Freezing objects, pre-computation, cache, #memoization.. which one you can use, when it's worthy?

    #ruby

  5. [Перевод] React useCallback() — полное руководство

    Всем привет! На связи Разобраться с useCallback() полностью

    habr.com/ru/companies/spectr/a

    #ecommerce #ecom #javascript #react #hook #memoization

  6. React. Обновление узлов и мемоизация

    В процессе разработки современных веб-приложений производительность часто становится одним из ключевых аспектов, которые волнуют и разработчиков, и пользователей. Пользователи ожидают молниеносного отклика, а разработчики стремятся создать приложения, которые работают быстро и эффективно. Одним из мощных инструментов, позволяющих достигнуть высокой производительности в React-приложениях, является мемоизация. Мемоизация помогает значительно сократить количество вычислений и, соответственно, обновлений интерфейса, что положительно сказывается на общей скорости и отзывчивости приложения. В данной статье мы заглянем "под капот" движка React и увидем, как именно происходит обновление узлов. Параллельно рассмотрим и основные принципы мемоизации и её применение в различных типах компонентов.

    habr.com/ru/articles/821293/

    #react #reactjs #reactjs #мемоизация #memoization

  7. Iuri de Silvio is presenting the talk "Caching everywhere" at the DjangoCon Europe 2023 in Edinburgh 🏴󠁧󠁢󠁳󠁣󠁴󠁿🦄🚀

    CC @djangoconeurope

    pretalx.com/djangocon-europe-2

  8. A Guide to Memoization in #Ruby, by @appsignal

    blog.appsignal.com/2022/12/20/

    > Memoization is a caching technique to make your Ruby application run more efficiently and faster.

    > In this post, we'll look at the benefits of memoization and when to use it in your Ruby application. We'll also look at some memoization mistakes to avoid.

    #performance #memoization #caching #optimization

  9. A Guide to Memoization in #Ruby, by @appsignal

    blog.appsignal.com/2022/12/20/

    > Memoization is a caching technique to make your Ruby application run more efficiently and faster.

    > In this post, we'll look at the benefits of memoization and when to use it in your Ruby application. We'll also look at some memoization mistakes to avoid.

    #performance #memoization #caching #optimization

  10. Nice write up by Prateek Karki on using memoization techniques in React. Great skill to learn about if you haven't looked into it before.

    👉toptal.com/react/react-memoiza

  11. Nice write up by Prateek Karki on using memoization techniques in React. Great skill to learn about if you haven't looked into it before.

    👉toptal.com/react/react-memoiza

    #React #Memoization

  12. Of course we could choose to avoid #memoization altogether. Avoid #currying. Avoid retaining state. Just pass around argument parameters and recalculate function results every time.

    It'll be safer.

    And it'll be slower.

    So we must come up with something better.

    And that can't be achieved with the current version of the #Java #programmingLanguage or the #JVM.

    It can't be achieved on current o.s. kernels or any consumer computer chips.

    #Immutability is an illusion.

  13. It's just asking for trouble. It's like asking for a #hacker to go in and change a few bits in memory you thought wasn't shared - but you were wrong. Thank you, #Spectre and #Meltdown #vulnerabilities.

    And it's worse, because you didn't even know that #memoization was used: it's a black box, a hidden implementation, remember? How do you test what you can't see? How do you trust what you can't know?

    Well. Partially through making the code public. Yay, #openSource #software.

  14. And the same occurs with any value remembered beyond a very short lifetime, and sometimes even then. (Looking at you, #multithreading.)
    Because a file system is #mutable, our #software #application suffers the effects of the change. And if the #programmingLanguage allows for mutability, like #Java does, then it too suffers the effect of change on remembered values. Especially when we, the programmers, can't see that values were remembered. Which is what #memoization does.

  15. A file on a file system is a prime example of #memoization: it retains data that was the result of some operation. The o.s. provides ways to read and change the contents.

    Let's assume the file contains some configuration at the start of a program. The program reads it and alters its processing accordingly.

    Then halfway through, a human interferes and changes the file contents.

    How does the program react? Does it change? Does it crash? Does it corrupt some data?

  16. It is wrong to dismiss #unittesting of #memoization as useless or impractical, just because it's an invisible implementation that is subject to change.

    It is wrong because of scope, life cycle, and mutability. Let me work that out.

    Reference scope determines where the reference is available to a process. Life cycle says when it becomes available, how long it stays available, and what happens in the mean time. And mutability dictates that the refered value can change without notice.

  17. #Memoization is a technique used to optimize #software performance. It avoids having to recalculate / reload / reprocess every time a function produces a result.

    But it requires some memory object to use later, retaining the result in a scoped way. The implementation of the memory usually is hidden in private internals.

    And that raises 2 questions:
    - how can we test it?
    - should we test it?

    The latter depends on the remembered object's scope and life cycle. And that is important.

  18. #Currying in #FunctionalProgramming is a way to temporarily retain a value for later use. The value is retained in a new, scoped function instance.

    Wait.

    What?

    Isn't that quite similar to what the #ObjectOriented #Java #programmingLanguage does when it retains a value in a Class instance, for later use?

    Yes.

    Yes, it is.

    And that makes currying feel like cheating. Which makes #FP languages that allow it, feel like a hack.

    So, what else is there? #Memoization?