# Deepmind의 AlphaDev가 더 빠른 Sort 알고리즘 발견

> Clean Markdown view of GeekNews topic #9352. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=9352](https://news.hada.io/topic?id=9352)
- GeekNews Markdown: [https://news.hada.io/topic/9352.md](https://news.hada.io/topic/9352.md)
- Type: news
- Author: [play1204dev](https://news.hada.io/@play1204dev)
- Published: 2023-06-08T11:35:01+09:00
- Updated: 2023-06-08T11:35:01+09:00
- Original source: [deepmind.com](https://www.deepmind.com/blog/alphadev-discovers-faster-sorting-algorithms)
- Points: 28
- Comments: 4

## Topic Body

- C/C++ 레벨의 언어로는 개선이 어렵다고 판단, 어셈블리어 레벨에서 개선을 시도  
- 마치 게임처럼 주어진 답에 맞는 답을 내는 알고리즘을 끊임없이 탐색  
- LLVM libc++ sorting library 대비 적은 수에선 70% 빠른 성능, 25만개를 넘는 시퀀스에선 1.7% 빠른 성능을 보여줌  
- 대부분의 정렬이 짧은 시퀀스에서 일어나기 때문에 여기에 더 집중함  
- 단순히 빠른 것이 아니라 알파고의 37수에 비견되는 기발한 접근법을 보여줌  
- 해싱 알고리즘도 개선 중

## Comments



### Comment 16444

- Author: kuroneko
- Created: 2023-06-08T13:46:40+09:00
- Points: 2

AI로 더 나은 알고리즘도 찾을 수 있다니 정말 신기하네요.

### Comment 16448

- Author: dbs0829
- Created: 2023-06-09T10:39:14+09:00
- Points: 1
- Parent comment: 16444
- Depth: 1

딥러닝에서 사용하는 optimizer도 최근에는 저런식으로 찾는 시도가 꽤 이루어지고 있더라고요. 성능도 좋고요.

### Comment 16443

- Author: spark
- Created: 2023-06-08T13:43:31+09:00
- Points: 1

"대부분의 정렬이 짧은 시퀀스에서 일어나기 때문에 여기에 더 집중함"이 아니라 그냥 3개, 4개, ... 8개의 정해진 개수의 숫자를 정렬하는 어셈블리 알고리즘을 발견하도록 학습시켰습니다.

### Comment 16445

- Author: disjukr
- Created: 2023-06-08T14:32:10+09:00
- Points: 2
- Parent comment: 16443
- Depth: 1

원문을 보면 AlphaDev를 만든 연구진들이 그런 의도를 갖고 학습시켰다는 걸로 보이네요.  
  
> We focused on improving sorting algorithms for shorter sequences of three to five elements. These algorithms are among the most widely used because they are often called many times as a part of larger sorting functions. Improving these algorithms can lead to an overall speedup for sorting any number of items.
