{"size": 2128, "ext": "scrbl", "max_stars_repo_path": "share/pkgs/racket-doc/scribblings/reference/implementation.scrbl", "max_stars_repo_name": "takikawa/racket-ppa", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "share/pkgs/racket-doc/scribblings/reference/implementation.scrbl", "max_issues_repo_name": "takikawa/racket-ppa", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "share/pkgs/racket-doc/scribblings/reference/implementation.scrbl", "max_forks_repo_name": "takikawa/racket-ppa", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": null, "avg_line_length": 45.2765957447, "max_line_length": 81, "alphanum_fraction": 0.7438909774}
#lang scribble/doc
@(require "mz.rkt")

@title[#:tag "implementations" #:style 'quiet]{Implementations}

The definition of Racket aims for determinism and independence from
its implementation. Nevertheless, some details inevitably vary with
the implementation. Racket currently has two main implementations:

@itemlist[

 @item{The @deftech{CS} implementation is the default implementation
       as of Racket version 8.0. This variant is called ``CS'' because
       it uses Chez Scheme as its core compiler and runtime system.

       The CS implementation typically provides the best performance
       for Racket programs. Compiled Racket CS code in a
       @filepath{.zo} file normally contains machine code that is
       specific to an operating system and architecture.}

 @item{The @deftech{BC} implementation was the default implementation
       up until version 7.9. The ``BC'' label stands for ``before
       Chez'' or ``bytecode.''

       Compiled Racket BC code in a @filepath{.zo} file normally
       contains platform-independent bytecode that is further compiled
       to machine code ``just in time'' as the code is loaded.

       Racket BC has two variants: @deftech{3m} and @deftech{CGC}.
       The difference is the @tech{garbage collection} implementation,
       where 3m uses a garbage collector that moves objects in memory
       (an effect that is visible to foreign libraries, for example)
       and keeps precise track of allocated objects, while CGC uses a
       ``conservative'' collector that requires less cooperation from
       an embedding foreign environment. The 3m subvariant tends to
       perform much better than CGC, and it became the default
       variant in version 370 (which would be v3.7 in the current
       versioning convention).}

]

Most Racket programs run the same in all implementation variants, but some Racket
features are available only on some implementation variants, and the
interaction of Racket and foreign functions is significantly different
across the variants. Use @racket[system-type] to get information about
the current running implementation.
