ashvardanian / ashvardanian/NumKong

Feature: Split MinMax and ArgMinMax reductions

Open
#322 0 comments 0 reactions 0 assignees View on GitHub
enhancement v8
Dominant language
C
Stars
1.9k
Forks
130
Avg merge
18h 28m
Merged PRs (30d)
3

Description

### Describe what you are looking for

Finding the minimum and the maximum value in a sequence is fundamentally cheaper, than locating that offset position in a vectorized form. It potentially makes sense to split `nk_reduce_minmax` into two APIs:

- `nk_reduce_argminmax` - returning two offsets
- `nk_reduce_minmax` - returning two scalar values

Relates to #315

### Can you contribute to the implementation?

- [x] I can contribute

### Is your feature request specific to a certain interface?

It applies to everything

### Contact Details

_No response_

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing nk_reduce_minmax API and reviewing related issue #315. Compare how the reduction is exposed across the project's interfaces; done means separate nk_reduce_argminmax offset results from nk_reduce_minmax scalar results everywhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.