タグ

GCとghcに関するigrepのブックマーク (5)

  • Using GHC low-latency garbage collection in production

    This is a guest post by Domen Kožar. In this post I’ll dive into how low-latency garbage collection (GC) has improved developer experience for Cachix users. The need for low latency Cachix serves the binary cache protocol for the Nix package manager. Before Nix builds a package, it will ask the binary cache if it contains the binary for a given package it wants to build. For a typical invocation o

  • GHC/RTSのGCについて - Qiita


    Haskell Haskell Haskell使 {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC "-ddump-simpl" #-} module Main2 where bench :: Int -> (a ->a) -> a -> a bench n f i = gon i where go0 !i = i gok !i = go(k-1) (f i) {-# NOINLINE bench #-}main :: IO () main = prin
    GHC/RTSのGCについて - Qiita
    igrep
    igrep 2019/01/29
    あまり見かけたことがない解説なので非常にありがたい!
  • Compact Regionsについて軽く - Qiita

    現在ghc最新は8.6です。 Compact Regionsはghc-8.2から搭載された機能です。 Compact RegionsはGC中に走査されない、連続したメモリ領域に載ったデータを提供します。 Hackage / compact: Non-GC'd, contiguous storage for immutable data structures サーバーにバッチ処理で生成しておいたデータ(数百MBから数十GBくらいでしょうか)を持たせておくことを考えましょう。そのデータはサーバーがリクエストを捌く際にRead Onlyでアクセスされるとします。 そういうこと自体は問題によりますが、まあよくやることと思います。Redis等にアクセスするにもネットワークは遅すぎる、手元のKVSでも毎回デシリアライズ発生するのは遅すぎるといったケースですね。 しかしGHCのようなGC持つ処理系でサー

    Compact Regionsについて軽く - Qiita
    igrep
    igrep 2018/12/09
    “GHCにはimmutabilityとかpurityを前提とした機能や最適化がそこそこあったりして、他の言語が真似しようにも真似できないことが割とあるように思います.”
  • osa1 - Three runtime optimizations done by GHC's GC

    igrep
    igrep 2018/03/19
  • GitHub - ezyang/compact: Compact regions library for Haskell

    Non-GC'd, contiguous storage for immutable data structures. This package provides user-facing APIs for working with "compact regions", which hold a fully evaluated Haskell object graph. These regions maintain the invariant that no pointers live inside the struct that point outside it, which ensures efficient garbage collection without ever reading the structure contents (effectively, it works as a

    GitHub - ezyang/compact: Compact regions library for Haskell
    igrep
    igrep 2017/08/27
    "user-facing APIs for working with "compact regions", which hold a fully evaluated Haskell object graph. These regions maintain the invariant that no pointers live inside the struct that point outside it"
  • 1