• JIT Code Generation with AsmJit and AsmTk (Wed, June 11th)

    From Richard@21:1/5 to All on Fri May 30 17:11:07 2025
    [Please do not mail me a copy of your followup]

    <https://www.meetup.com/utah-cpp-programmers/events/307994613/>

    What do you do if you have some sort of user-defined expressions that
    you need to evaluate? Let's assume you have some way of parsing that
    text into a meaningful data structure, such as an abstract syntax tree
    (AST). The obvious answer is to write some code that traverses your
    AST and acts as an interpreter to produce the results.

    Iterated Dynamics has a "formula" fractal type that allows you to
    write your own little formula for iterating points in the complex
    plane in order to define your typical "escape time" fractal.
    Currently, the code uses an interpreter approach as described above.

    However, this interpreted formula is in the inner loop of the image computation. The original MS-DOS FRACTINT code had a just-in-time
    (JIT) code generator for the 8087/80287/80387 math coprocessor that
    would compute the formula described by the user's input. Because this
    code was executing natively on the hardware, it outperformed any
    interpreter.

    This month, Richard Thomson will give us an overview of the
    AsmJit/AsmTk libraries for generating in-memory machine instructions
    that we can call from C++. We'll look at how AsmJit exposes the
    assembly and linking process and the tools that it provides beyond the
    basic process of storing machine code into memory.

    AsmJit/AsmTk: <https://asmjit.com/>

    This will be an online meeting, so drinks and snacks are on you!

    Join the meeting here: <https://meet.xmission.com/Utah-Cpp-Programmers>

    Watch previous topics on the Utah C++ Programmers YouTube channel: <https://www.youtube.com/@UtahCppProgrammers>

    Future topics: <https://utahcpp.wordpress.com/future-meeting-topics/>
    Past topics: <https://utahcpp.wordpress.com/past-meeting-topics/>
    --
    "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
    The Terminals Wiki <http://terminals-wiki.org>
    The Computer Graphics Museum <http://computergraphicsmuseum.org>
    Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)