Skip to content

Conversation

@Matistjati
Copy link
Collaborator

@Matistjati Matistjati commented Dec 7, 2025

Closes #530 and #531.

The part about portability is of course highly subjective, but I think we can all agree that we should try to strive to make problem packages portable for the foreseeable future?

We should probably create a concrete example in examples. I tried using std_image_write.h, and it seems to work well.

I used it as a basis for timing: 5 seconds seems to be plenty of time.
Here's the output of timing, running single-threaded on 3.6GHz processor (Intel i5-8600K), running on WSL, compiled with gcc and O2. Compilation time with minimal standard library includes is ~350ms, which is not bad at all (the effect of a single #include <bits/stdc++.h> is much greater). I chose .jpg quality level 90.
Code for test

  14x  14  of noise     with format .jpg took 0ms
31  x31    of noise     with format .jpg took 0ms
70  x70    of noise     with format .jpg took 0ms
158 x158   of noise     with format .jpg took 2ms
353 x353   of noise     with format .jpg took 10ms
790 x790   of noise     with format .jpg took 50ms
1767x1767  of noise     with format .jpg took 240ms
3952x3952  of noise     with format .jpg took 1185ms
8838x8838  of noise     with format .jpg took 5928ms
****
14  x14    of gradient  with format .jpg took 454ms
31  x31    of gradient  with format .jpg took 0ms
70  x70    of gradient  with format .jpg took 0ms
158 x158   of gradient  with format .jpg took 0ms
353 x353   of gradient  with format .jpg took 2ms
790 x790   of gradient  with format .jpg took 12ms
1767x1767  of gradient  with format .jpg took 58ms
3952x3952  of gradient  with format .jpg took 277ms
8838x8838  of gradient  with format .jpg took 1348ms
19764x19764  of gradient  with format .jpg took 6780ms
****
14  x14    of noise     with format .png took 0ms
31  x31    of noise     with format .png took 4ms
70  x70    of noise     with format .png took 5ms
158 x158   of noise     with format .png took 6ms
353 x353   of noise     with format .png took 151ms
790 x790   of noise     with format .png took 167ms
1767x1767  of noise     with format .png took 751ms
3952x3952  of noise     with format .png took 3802ms
****
14  x14    of gradient  with format .png took 287ms
31  x31    of gradient  with format .png took 0ms
70  x70    of gradient  with format .png took 0ms
158 x158   of gradient  with format .png took 1ms
353 x353   of gradient  with format .png took 7ms
790 x790   of gradient  with format .png took 38ms
1767x1767  of gradient  with format .png took 148ms
3952x3952  of gradient  with format .png took 741ms
8838x8838  of gradient  with format .png took 3756ms
****

Where gradient looks something like this
image

And noise like this
image

@Matistjati Matistjati linked an issue Dec 7, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should we specify some recommended limits for output_visualizers? Let's add some DO:s and DON'T:s for output visualizers

2 participants