Tag algorithm

5 bookmarks have this tag.

2024-05-13

1256.

Bloom Filters

samwho.dev/bloom-filters

A visual, interactive guide to what bloom filters are, when you would use them, and how they work.

2024-04-03

1216.

s-macke/VoxelSpace: Terrain rendering algorithm in less than 20 lines of code

github.com/s-macke/VoxelSpace

Terrain rendering algorithm in less than 20 lines of code - s-macke/VoxelSpace

via https://t.me/optorepost/55

Если кратко, то там вся карта хранится в виде двух текстур, а "воксели" рендерятся хитрым образом, просто проходя по этим текстурам в нужном порядке.

2023-07-29

525.

research!rsc: Using Uninitialized Memory for Fun and Profit

research.swtch.com/sparse

You can have a very time efficient set implementation with two uninitialized arrays. It's not space efficient though.

2023-07-14

448.

“Low-Resource” Text Classification: A Parameter-Free Classification Method with Compressors

aclanthology.org/2023.findings-acl.426

One can use gzip to classify data.

Deep neural networks (DNNs) are often used for text classification due to their high accuracy. However, DNNs can be computationally intensive, requiring millions of parameters and large amounts of labeled data, which can make them expensive to use, to optimize, and to transfer to out-of-distribution (OOD) cases in practice. In this paper, we propose a non-parametric alternative to DNNs that’s easy, lightweight, and universal in text classification: a combination of a simple compressor like gzip with a k-nearest-neighbor classifier. Without any training parameters, our method achieves results that are competitive with non-pretrained deep learning methods on six in-distribution datasets.It even outperforms BERT on all five OOD datasets, including four low-resource languages. Our method also excels in the few-shot setting, where labeled data are too scarce to train DNNs effectively.

Our method is a simple, lightweight, and uni- versal alternative to DNNs. It’s simple because it doesn’t require any preprocessing or training. It’s lightweight in that it classifies without the need for parameters or GPU resources. It’s universal as com- pressors are data-type agnostic, and non-parametric methods do not bring underlying assumptions.

Without any pre-training or fine-tuning, our method outperforms both BERT and mBERT on all five datasets.

Questioned:

2023-07-09

440.

State Machines: Introduction

blog.yoshuawuyts.com/state-machines

It's fun and easy to express state machines in Rust, as this article clearly shows. Wouldn't be that much fun in Go, innit?

Using type system for ensuring correctness of the state machines is a good idea. I should do that...

This article has two sequels.