Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Performance is a subset of Optimization: performance is the goal when you want the execution time of your program or routine to be optimal.
1
vote
Color substitution in a BufferedImage
Instead of shifting each and every pixel and testing against each input R, G, and B values, why not shift your input RGB (and implied A) once and then match that against the full four byte value at ea …
7
votes
5
answers
843
views
Writing image pixel data to printer code
I've been trying to take image pixel data and write it out into printer code and my results are rather slow.
Here is a simplified version of what I have so far (image is a PIL Image object of 1200 x …
3
votes
Accepted
Writing image pixel data to printer code
This is the code I finally arrived at. Not only is it way faster (less than 1 second!), but it still maintains good legibility and doesn't rely on additional libraries.
This assumes the image format …
1
vote
Binary Tree Inversion
I suspect the biggest slow down here is the if statement. Even if both left and right are NULL there is no harm in swapping them. The swap itself is likely quite fast, not much slower than the compari …