This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To run tests, do : | |
// zig test -OReleaseSafe -Dcpu=native -Dtarget=native matmul.zig | |
// To run main, do : | |
// zig build-exe -OReleaseFast -Dcpu=native -Dtarget=native matmul.zig | |
// ./matmul | |
// | |
// โโโโ โโโโ โโโโโโ โโโโโโโโโโโโโ โโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโ | |
// โโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useCallback, useRef } from 'react'; | |
/** | |
* Represents a point in 3D space within the Lorenz system. | |
*/ | |
interface Point { | |
x: number; | |
y: number; | |
z: number; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useEffect, useCallback, useRef } from 'react'; | |
type ColoredChar = { | |
char: string; | |
color: string; | |
}; | |
const defaultConfig = { | |
scale: 0.05, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
// Can also try: | |
// 8 x 64 | |
// 16 x 64 | |
// Top GFLOPs/s on an Intelยฎ Coreโข i7-13620H Processor = 300.9 GFLOPs/s | |
// Comments were added using Claude. | |
// To run simply run zig build-exe -O ReleaseFast matmul_FP32.zig, then run the binary ./matmul_FP32 | |
// To test simply run zig test -O ReleaseFast matmul_FP32.zig | |
// To test performance on a generated binary, run : sudo perf stat -e cache-misses,cache-references,instructions,cycles ./matmul_FP32 |