Skip to content

Instantly share code, notes, and snippets.

View Jeevananthan-23's full-sized avatar
🎯
Focusing

Jeevananthan Jeevananthan-23

🎯
Focusing
View GitHub Profile
@Jeevananthan-23
Jeevananthan-23 / fileiouring.zig
Last active February 8, 2024 13:39
io_uring for fileio and networkio in zig
const std = @import("std");
const OUT_FILE = "out.bin";
const BUFFER_SIZE: u64 = 4096;
fn readNBytes(
allocator: *const std.mem.Allocator,
filename: []const u8,
n: usize,
) ![]const u8 {
@Jeevananthan-23
Jeevananthan-23 / stack.zig
Created February 1, 2024 05:05
Simple Stack implementation in Zig
const std = @import("std");
fn Stack(comptime T: type) type {
return struct {
const Node = struct {
value: T,
next: ?*Node,
};
const Self = @This();
@Jeevananthan-23
Jeevananthan-23 / HTTPClient.cs
Last active January 10, 2024 14:21
Multithread TCP Sever & HTTPClient written in C#(Managed Code)
using System.Buffers;
string serverUrl = "http://localhost:2305";
int numRequests = 100000;
int concurrency = 100;
using HttpClient client = new();
using var semaphore = new SemaphoreSlim(concurrency);
var tasks = new Task[numRequests];