Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

qsort could be renamed to not collide with libc one #1

Description

@Yoshqu

In my particular scenario I have created amalgamated code:

cat *.c platform/win32/*.c > ../agla.c

This works if qsort is named differently (because all includes are in one file).

$ gcc  -I. -O3 -fomit-frame-pointer *.c platform/win32/*.c -o bench-mingw.exe
$ ./bench-mingw.exe
Incredibly Simple Benchmark! 1.0.0 (5 seconds per test)

Random numbers (10447.64):              807.1M / s
Word Count (15):                        1.7M / s
CRC32 (0x9F83FE8C):                     2.8M / s
RLE (12.19%):                           996.1k / s
Sort (202572):                          3.2M / s

$ gcc  -I. -O3 -fomit-frame-pointer ../agla.c -o bench-mingw-agla.exe
$ ./bench-mingw-agla.exe
Incredibly Simple Benchmark! 1.0.0 (5 seconds per test)

Random numbers (10447.64):              809.6M / s
Word Count (15):                        2.5M / s
CRC32 (0x9F83FE8C):                     2.8M / s
RLE (12.19%):                           841.1k / s
Sort (202572):                          3.3M / s

Quite funny to see that whole program compiling make such difference on Word Count, while being worse on RLE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions