Comments (3)
LLVM-MOS is approximately 3732.64 times as fast as a comparable 80s compiler, especially when you are taking the correct medications.
from llvm-mos-sdk.
How much faster is a LLVM MOS program compared to the same program compiled in an 80s compiler?
The old compilers are not just dated optimization-wise, but difficult to set up. You'll have to come up with your own numbers. There are 6502 benchmarks out there, so you could start by adapting their code to compile on both LLVM-MOS and an 80s 6502 compiler of choice.
Would LLVM MOS code be as optimized as an 80s assembly program?
That's a complicated question. The scope of "optimizations easy for a compiler, but difficult for a human" is distinct from "optimizations easy for a human, but difficult for a compiler".
For modern CPUs, it is hard to write assembly by hand faster than a compiler in part because it's hard to outmatch the compiler's ability to reason about all the particular performance characteristics of a given CPU, let alone trying to come up with the "best approximation" across a wide range of hardware generations. That problem does not exist for something like the 6502 or Z80, where it's reasonable for a human to hold the entirety of the CPU's performance model in their head.
My personal hunch would be that: no, for a platform like the 6502, a human will always be able to write more optimized code than a compiler, given enough time. But in your question's context (isekai fiction), there's other factors to consider:
- Back in the day, a lot of code was not well-optimized. People wrote this stuff as their day job, and not everyone was a performance fanatic willing to spend extra hours squeezing every last bit of performance - not to mention, often software was rushed out the door.
- Speaking of rushing out the door, programming always leads to code with bugs - and there are many pitfalls of lower-level languages which higher-level ones can avoid. In short: it's easier to avoid certain bugs when writing C instead of hand assembly.
- Speaking of avoiding bugs, a hypothetical time-travelling programmer would have the benefit of hindsight. Assuming he managed to bring a copy of, say, StackOverflow with him, he'd have a significant edge over developers who couldn't check a crowdsourced optimal answer to most routine problems they might run into.
Therefore, a modern 6502 C compiler will always allow you to write better code faster than you would do by hand - but if you have infinite time, I'd say you will always be able to beat the compiler.
Hopefully that inspires aspects of your writing hobby. Please don't rely on Bard or ChatGPT for niche subjects.
from llvm-mos-sdk.
LLVM-MOS is approximately 3732.64 times as fast as a comparable 80s compiler, especially when you are taking the correct medications.
That's a huge difference. Good to know.
Sorry for not being specific enough. But I'm also hope to know about program benchmarks, not just compile time.
from llvm-mos-sdk.
Related Issues (20)
- MMC3 IRQ setup doesn't work "out of the box"
- Add new platform(s): Foenix F256 Jr & K HOT 5
- Separate out SDK test workflow from packaging
- start address is indeterminate (because of zp data section)? HOT 1
- Write a simplified libretro runner
- Complete the libc using pieces from pdclibc HOT 1
- Investigate making `text.fixed` for libcalls
- Automatically generated linker scripts lack CMake integration HOT 1
- Verify negative tests fail for the "right" reasons
- Reading directly from memory HOT 2
- Create a test workflow that runs on PRs
- Implement libm min and max functions HOT 6
- 24-bit integer types in stdint.h HOT 1
- Builder for Apple Silicon
- mos-sim crash HOT 2
- realloc returns memory overlapping with other memory block HOT 3
- Decide intermediate and long-term support for the 45GS02 CPU and relatives HOT 2
- Sanitize license compliance for dependent projects HOT 1
- Load addresses aren't relocated on CP/M-65 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-mos-sdk.