bit manipulation (1) bits (1) break (2) byte (1) ByteString (1) cache (2) fast (2) lazy (13) Memoize (4) struct (1) structs (1)

Snippets in category Optimizations

  • Efficient Immutable String Concat

    Efficient Immutable String Concat

    4 people like this
    Posted: 1 years ago by fholm

  • Lazy String

    Lazy string based on seq<char>

    4 people like this
    Posted: 1 years ago by Ankur Dhama

  • The repmin problem

    The repmin problem is to replace all elements of a tree of numbers by the minimum element, making only a single pass over the original tree. Repmin is a very ingenious example of Circular Programming.

    1 people like this
    Posted: 1 years ago by Nick Palladinos

  • F# Future using lazy and a threading event

    F# Future using lazy and a threading event. Supports creating futures from functions or asyncs. Eager evaluation of can be specified.

    3 people like this
    Posted: 11 months ago by Ankur Dhama

  • memoizeBy

    Sometimes you might wish to memoize a function whose input doesn't have the equality and comparison constraints, or maybe the comparison of your given type is just too slow for what you need. To fix this, you simply provide a function which converts the input into something more fitting as an extra parameter.

    7 people like this
    Posted: 10 months ago by Rick Minerich

  • LazyBuilder

    I made LazyBuilder. The synthesis of the lazy function is troublesome. When the call of the Force() method increases, it is ugly. This solves the problem.

    8 people like this
    Posted: 10 months ago by zecl

  • Iteratee

    An iteratee based on https://john-millikin.com/software/enumerator/ and http://okmij.org/ftp/Haskell/Iteratee/IterateeIO-talk-notes.pdf

    6 people like this
    Posted: 10 months ago by Ryan Riley

  • ByteString

    An initial attempt at creating a ByteString type based on the Haskell version.

    1 people like this
    Posted: 10 months ago by Ryan Riley

  • IterateeCPS

    An iteratee that uses continuation-passing style as an optimization. There is no more discriminated union, and the signature should feel familiar to those using Async.StartWithContinuations.

    5 people like this
    Posted: 9 months ago by Ryan Riley

  • Clumsy LoopBuilder

    Clumsy LoopBuilder.It's mischievous trick.

    4 people like this
    Posted: 8 months ago by zecl

  • Lazy variable

    When we need lazy evaluation, we use the Lazy<'T>. However, the Lazy<'T> must evaluate explicitly. This example enables implicit evaluation(call-by-need).

    6 people like this
    Posted: 6 months ago by Nobuhisa

  • Simple timed-expiry cache

    Basic thread-safe timed-expiry cache, implemented as a MailboxProcessor.

    3 people like this
    Posted: 6 months ago by Yusuf Motara

  • Lazy Xml

    A Lazy Xml structure for processing large xml documents.

    6 people like this
    Posted: 1 months ago by Nick Palladinos

  • Concurrent Memoization

    Memoize a function in a thread-safe manner.

    3 people like this
    Posted: 21 hours ago by Matt Collins