Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: int8 Clear Filter

A SQL Heuristic: ORs Are Expensive

A SQL Heuristic: ORs Are Expensive Query planning is hard. Sometimes. Queries often have more than one filter (using an and clause). But the developer can often end up in situations requiring an or clause: select count(*) from application where submitter_id = :user_id or reviewer_id = :user_id; But this is slow! With 1,000,000 applications and 1000 users uniformly distributed on both columns, it takes over 100ms.1 If we rewrite it with only and s select ( select count(*) from application

A SQL Heuristic: Ors Are Expensive

A SQL Heuristic: ORs Are Expensive Query planning is hard. Sometimes. Queries often have more than one filter (using an and clause). But the developer can often end up in situations requiring an or clause: select count(*) from application where submitter_id = :user_id or reviewer_id = :user_id; But this is slow! With 1,000,000 applications and 1000 users uniformly distributed on both columns, it takes over 100ms.1 If we rewrite it with only and s select ( select count(*) from application

C-sigma: Easy-to-use Sigma proofs in C using libsodium

Sigma Protocols Implementation in C A clean, simple C implementation of Sigma protocols with Fiat-Shamir transformation for non-interactive zero-knowledge proofs. Features Schnorr Protocol: Prove knowledge of discrete logarithm Chaum-Pedersen Protocol: Prove discrete logarithm equality (DLEQ) Non-interactive proofs: Using Fiat-Shamir transformation with SHAKE128 Minimal API: Just 6 functions for complete functionality No abstractions: Direct use of byte arrays, no wrapper types Secure: B

Accelerated Game of Life with CUDA / Triton

Let’s look at implementing Conway’s Game of Life using a graphics card. I want to experiment with different libraries and techniques, to see how to get the best performance. I’m going to start simple, and get increasingly complex as we dive in. The Game Of Life is a simple cellular automata, so should be really amenable to GPU acceleration. The rules are simple: Each cell in the 2d grid is either alive or dead. At each step, count the alive neighbours of the cell (including diagonals). If the c

Writing a Game Boy Emulator in OCaml

Introduction For the past few months, I have been working on a project called CAMLBOY, a Game Boy emulator written in OCaml that runs in the browser. You can try it out on the following demo page: Demo Page I included several homebrew ROMs in the demo, so please try them out (I recommend Bouncing ball and Rocket Man Demo). You can also play with it in your mobile browser as it runs at 60 FPS on recent smartphones. Repository You can find the repository here: https://github.com/linoscope/CA

Topics: arg bit type uint16 uint8