News for hackers. Stuff that matters.
Re:The most unethical thing I was asked to build while worki... by ryandrake on Monday November 07, 2022 @04:22PM (#33512665)
It depends on how junior the engineer is. My first job out of college, I was asked to write some code to cheat a benchmark, basically detect when a particular benchmark program was running and only then put the software into an alternate "fast path" that would result in better benchmark results. I agonized over this and didn't want to refuse. This was my first real job as a professional developer, and I didn't want to make waves. Eventually I got the nerve to tell my boss I was uncomfortable with the assignment, and he said "Oh, no problem at all! We keep our devs happy here." and assigned me onto another task. Joe, three cubicles down was more than happy to write the benchmark-cheating code.
Re:The most unethical thing I was asked to build while worki... by rtev on Monday November 07, 2022 @05:04PM (#33513203)
You did the right thing. If more people spoke up and stood up, the world would be a much happier place.
Re:The most unethical thing I was asked to build while worki... by sebastiansm on Monday November 07, 2022 @05:52PM (#33513686)
Some people don’t need to stand up because they don’t see any bad or evil in his work.
Re:The most unethical thing I was asked to build while worki... by koyote on Monday November 07, 2022 @05:29PM (#33513468)
Just out of curiosity, why did the software not always use the 'fast path'?
Re:The most unethical thing I was asked to build while worki... by Infinity315 on Monday November 07, 2022 @05:48PM (#33513646)
Probably more than likely it's not generalizable to real world conditions.

Benchmarks are meant to be reproducible, meaning perfectly predictable. CPUs have things called branch predictors which try to predict what the software is going to do and try to do the calculation ahead of time resulting in (hopefully, if it predicted right) faster execution time. If you know which 'branches' a benchmark goes down, you can make a program which can coax the branch predictor to always make the right guesses for a given benchmark.

A program branches whenever you encounter some sort of conditional if-else statement.

Re:The most unethical thing I was asked to build while worki... by rot13xor on Monday November 07, 2022 @09:17PM (#33515202)
Some optimizations might only apply to certain inputs that are used by benchmarking software. Or the driver makes unfavorable power tradeoffs to maximize performance when a benchmark is running. For example, if the driver knows a benchmark is single threaded, it can artificially throttle other cores and boost the core the benchmark is running on. There's more extreme stuff like GPU drivers replacing shaders (benchmarks don't care about graphics quality) or pre-rendering frames. https://videocardz.com/74912/professional-overclocker-demons...
Re:The most unethical thing I was asked to build while worki... by pixl97 on Tuesday November 08, 2022 @09:45AM (#33519492)
If you have the answer card to a test it takes much less 'computation' to get the test correct.

Print '2' is lot less operations than (insert formula here) if you know the answer is already 2.