Skip to content

Commit

Permalink
Update to latest master: 0.10.0-dev.3394+1a1b7a3af
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix "xq" Queißner committed Aug 2, 2022
1 parent 5aa881a commit 72fda94
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 34 deletions.
5 changes: 5 additions & 0 deletions benchmarks/data/array-concat-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;144503;43023;1007786085
2022-03-14 17:51:19;110001;24933;1000317886
2022-03-15 09:19:25;442373;86323;1012227965
2022-08-01 07:36:18;141640;40508;1342166897
2022-08-01 07:37:00;98757;30730;1306766120
2022-08-01 07:37:11;93029;27658;1341309781
2022-08-01 07:37:35;92541;27727;1402401383
2022-08-01 07:37:47;240047;77245;1332377442
5 changes: 5 additions & 0 deletions benchmarks/data/array-creation-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;99315;15994;469843174
2022-03-14 17:51:19;98687;16343;451050382
2022-03-15 09:19:25;114469;17251;462058962
2022-08-01 07:36:18;182357;26540;535090998
2022-08-01 07:37:00;117195;17600;515562770
2022-08-01 07:37:11;107138;17460;521132326
2022-08-01 07:37:35;111747;19975;556306589
2022-08-01 07:37:47;107906;15994;515780206
5 changes: 5 additions & 0 deletions benchmarks/data/array-deep-copy-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;158262;22978;253425128
2022-03-14 17:51:19;96871;18648;222294338
2022-03-15 09:19:25;116146;21860;233939081
2022-08-01 07:36:18;270638;39670;306097835
2022-08-01 07:37:00;126833;23747;268443990
2022-08-01 07:37:11;114890;23816;265302988
2022-08-01 07:37:35;130465;25352;277489447
2022-08-01 07:37:47;112306;23467;267456085
5 changes: 5 additions & 0 deletions benchmarks/data/array-modification-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;100642;18927;584032658
2022-03-14 17:51:19;99943;19067;570154854
2022-03-15 09:19:25;124946;24235;609659804
2022-08-01 07:36:18;182358;29124;723839731
2022-08-01 07:37:00;135354;23746;711914022
2022-08-01 07:37:11;128161;27238;767648862
2022-08-01 07:37:35;139614;24654;713072720
2022-08-01 07:37:47;129277;23328;717505318
5 changes: 5 additions & 0 deletions benchmarks/data/basic-execution-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;82554;23397;42498963
2022-03-14 17:51:19;64883;18439;39820105
2022-03-15 09:19:25;106508;21650;41080944
2022-08-01 07:36:18;87302;24585;42057042
2022-08-01 07:37:00;90585;22908;38071370
2022-08-01 07:37:11;93449;24235;36609717
2022-08-01 07:37:35;85067;25772;37940208
2022-08-01 07:37:47;76337;23817;36616981
5 changes: 5 additions & 0 deletions benchmarks/data/cow-calls-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;135423;17181;2045099458
2022-03-14 17:51:19;135703;17112;1971642214
2022-03-15 09:19:25;148343;19834;2010286841
2022-08-01 07:36:18;179634;22698;2560973536
2022-08-01 07:37:00;172440;19905;2363456217
2022-08-01 07:37:11;168040;24794;2601422852
2022-08-01 07:37:35;158402;22908;2547212294
2022-08-01 07:37:47;169785;20534;2363859356
5 changes: 5 additions & 0 deletions benchmarks/data/function-call-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;109023;21511;963146676
2022-03-14 17:51:19;101550;20045;858196163
2022-03-15 09:19:25;113631;21511;905170047
2022-08-01 07:36:18;147297;24864;1092839652
2022-08-01 07:37:00;134167;23257;1045643460
2022-08-01 07:37:11;122084;24445;1064094541
2022-08-01 07:37:35;136053;24724;1125510903
2022-08-01 07:37:47;125716;22978;1052544445
5 changes: 5 additions & 0 deletions benchmarks/data/string-concat-ReleaseSmall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ time;compile;setup;run
2022-03-14 17:51:02;90096;20534;504607490
2022-03-14 17:51:19;73404;19067;480256677
2022-03-15 09:19:25;91492;33803;519769968
2022-08-01 07:36:18;94915;23327;658798382
2022-08-01 07:37:00;97570;22978;654418051
2022-08-01 07:37:11;89188;22839;676506152
2022-08-01 07:37:35;96033;24864;648460964
2022-08-01 07:37:47;94916;24654;650100440
16 changes: 8 additions & 8 deletions benchmarks/visualization/compile-ReleaseSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions benchmarks/visualization/run-ReleaseSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions benchmarks/visualization/setup-ReleaseSmall.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn createPackage(comptime root: []const u8) std.build.Pkg {
};
}

const linkPcre = @import("libs/koino/vendor/libpcre.zig/build.zig").linkPcre;
const linkPcre = @import("libs/koino/vendor/libpcre/build.zig").linkPcre;

const pkgs = struct {
const args = std.build.Pkg{
Expand All @@ -44,8 +44,8 @@ const pkgs = struct {
.name = "koino",
.source = .{ .path = "libs/koino/src/koino.zig" },
.dependencies = &[_]std.build.Pkg{
std.build.Pkg{ .name = "libpcre", .source = .{ .path = "libs/koino/vendor/libpcre.zig/src/main.zig" } },
std.build.Pkg{ .name = "htmlentities", .source = .{ .path = "libs/koino/vendor/htmlentities.zig/src/main.zig" } },
std.build.Pkg{ .name = "libpcre", .source = .{ .path = "libs/koino/vendor/libpcre/src/main.zig" } },
std.build.Pkg{ .name = "htmlentities", .source = .{ .path = "libs/koino/vendor/htmlentities/src/main.zig" } },
std.build.Pkg{ .name = "clap", .source = .{ .path = "libs/koino/vendor/zig-clap/clap.zig" } },
std.build.Pkg{ .name = "zunicode", .source = .{ .path = "libs/koino/vendor/zunicode/src/zunicode.zig" } },
},
Expand Down
2 changes: 1 addition & 1 deletion libs/koino
6 changes: 3 additions & 3 deletions src/benchmark/perf.zig
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ pub fn main() !u8 {
});

{
var dir = try std.fs.cwd().openDir(argv[1], .{ .iterate = true });
var dir = try std.fs.cwd().openIterableDir(argv[1], .{});
defer dir.close();

var iterator = dir.iterate();
while (try iterator.next()) |entry| {
const name = try string_arena.allocator().dupe(u8, entry.name);
const source = try dir.readFileAlloc(string_arena.allocator(), entry.name, size(1.5, .MeBi)); // 1 MB source
const source = try dir.dir.readFileAlloc(string_arena.allocator(), entry.name, size(1.5, .MeBi)); // 1 MB source

const target_file = try std.fmt.allocPrint(string_arena.allocator(), "{s}-{s}.csv", .{
name[0 .. name.len - std.fs.path.extension(name).len],
Expand All @@ -67,7 +67,7 @@ pub fn main() !u8 {
}
}

var output_dir = try std.fs.cwd().openDir(argv[2], .{ .iterate = true });
var output_dir = try std.fs.cwd().openDir(argv[2], .{});
defer output_dir.close();

for (files.items) |benchmark| {
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ fn run(options: RunCLI, files: []const []const u8) !u8 {
switch (result) {
.completed => return 0,
.exhausted => {
try std.io.getStdErr().writer().print("Execution exhausted after {d} instructions!\n", .{
try std.io.getStdErr().writer().print("Execution exhausted after {?d} instructions!\n", .{
options.limit,
});
return 1;
Expand Down Expand Up @@ -398,7 +398,7 @@ fn run(options: RunCLI, files: []const []const u8) !u8 {
switch (result) {
.completed => break :emulation,
.exhausted => {
try std.io.getStdErr().writer().print("Execution exhausted after {d} instructions!\n", .{
try std.io.getStdErr().writer().print("Execution exhausted after {?d} instructions!\n", .{
options.limit,
});
return 1;
Expand Down
2 changes: 1 addition & 1 deletion src/library/common/Decoder.zig
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ test "Decoder.read(Instruction)" {
var decoder = Decoder.init(pattern.text);
const instruction = decoder.read(Instruction);
if (!pattern.isMatch(instruction)) {
std.log.err("expected {}, got {}\n", .{ pattern.instr, instruction });
std.log.err("expected {!}, got {!}\n", .{ pattern.instr, instruction });
return error.UnexpectedToken;
}
}
Expand Down

0 comments on commit 72fda94

Please sign in to comment.