• Welcome to the Internet Infidels Discussion Board.

The superiority of ternary computers?

Hehe… I once blew a colleague’s mind when I told him that black was just a very dark white.
Yup. Eons ago I took a class on video production. One thing the instructor made clear from early on is pure color does not exist in nature. Nothing anyone's come up with to point the camera at produced a pure signal. This was before the days of digital where you can simply read the RGB codes of any pixel. A lot of stuff is so much easier these days (for you youngsters: video tape uses a helical scan system, the read and write heads are based on the assumption that the tape is moving across the head at a constant speed--you can't produce a clear image if there's any spin-up or spin-down going on. Thus the machine would spin up and synchronize both source tapes and switch from one to the other (or fade or such) during the vsync period. Careful planning, and you had to plan all your edits to minimize the number of times you copied stuff as the quality would go down a bit every time) but everything outside the electronics remains basically unchanged.
 
Actually GPT5 optimized code right throughout my game so that holy hand grenades exploding lifeforms went from 4-7 fps to 100+ fps (on an i3/GTX 1050 - the framerate is ok on a beefy computer). That partly involved optimizing EzySlice which is too technical for me (even to try and guess what it originally involved) - and it also kept the functionality changes that an Upwork guy made to EzySlice. It made it so that EzySlice wouldn't allocate lots of variables and would just reuse the arrays for everything, etc. Originally I asked it to optimize for IL2CPP but currently I'm using Mono.JIT again.
No. AI coding assistance has been shown to be of negative value. The problem is code is harder to read than to write--to be confident that what the AI spit out is accurate is harder than simply writing it. It sounds like what actually helped is that GPT found somebody's solution--something you could have done without AI. If you don't understand what that solution is doing you probably have undetected bugs. AI is the modern day incarnation of cargo cult programming.
 
Actually GPT5 optimized code right throughout my game so that holy hand grenades exploding lifeforms went from 4-7 fps to 100+ fps (on an i3/GTX 1050 - the framerate is ok on a beefy computer). That partly involved optimizing EzySlice which is too technical for me (even to try and guess what it originally involved) - and it also kept the functionality changes that an Upwork guy made to EzySlice. It made it so that EzySlice wouldn't allocate lots of variables and would just reuse the arrays for everything, etc. Originally I asked it to optimize for IL2CPP but currently I'm using Mono.JIT again.
No. AI coding assistance has been shown to be of negative value. The problem is code is harder to read than to write--to be confident that what the AI spit out is accurate is harder than simply writing it. It sounds like what actually helped is that GPT found somebody's solution--something you could have done without AI. If you don't understand what that solution is doing you probably have undetected bugs. AI is the modern day incarnation of cargo cult programming.
Actually the extensive changes it made resulted in no noticeable bugs. See post #18 for a summary for the large number of optimizations. It gave very elegant and easy to read code. I could even ask it to make parts even more elegant (and give it some code to keep). I can't even understand most of the original EzySlice code, let along make any significant optimizations. So anyway it reduced frame issues a lot - from about 140ms per frame to 10ms per frame. Those frame times are when there is an explosion, screen shake, 3 lifeforms being dynamically sliced into 4 body chunks, blood spray, blood splatter on everything, multiple death sound effects, etc and those things were all optimized. Those 10ms include all of the other things happening as well (rendering and AI, etc).
And in the past few days I still haven't detected any bugs in the game from its code. So GPT5 at least has made a huge difference for me. What is true about AI coding in the past isn't necessarily the case forever.
It sounds like what actually helped is that GPT found somebody's solution--something you could have done without AI
No those optimizations to EzySlice don't exist anywhere else. And it kept the additions my worker made. Also all of the other code it optimized was from myself. Also I asked for making EzySlice to be optimized for IL2CPP which is barely mentioned in Unity circles. This is a GPT5 summary of IL2CPP optimizations - so it is pretty technical - and my game still runs without issues (which often isn't the case for my own coding)
🔧 Code & API Usage
  • Avoid hidden allocations
    • Don’t use LINQ, foreach on non‑arrays, or implicit boxing in hot paths.
    • Pre‑allocate lists/arrays and reuse them (pooling).
    • Replace string concatenation in loops with StringBuilder or pooled buffers.
  • Minimise Reflection
    • IL2CPP keeps metadata for reflection, which costs memory and startup time.
    • Cache reflected members or bake lookups at build time.
    • Consider link.xml to strip unused metadata.
  • Inline where possible
    • IL2CPP does little automatic inlining for properties/methods.
    • Use [MethodImpl(MethodImplOptions.AggressiveInlining)] on small, frequently‑called methods.
    • Cache .Count or property values before loops.
  • Avoid virtual/interface calls in hot loops
  • These can’t be inlined and have extra dispatch cost.
  • Use sealed classes or direct calls where performance‑critical.
🗂 Memory & Data Layout
  • Struct packing
    • Use struct for small, immutable value types to reduce GC pressure.
    • Keep structs ≤16 bytes to avoid copy overhead.
  • Use blittable types for interop
    • Avoid managed object marshalling where possible.
  • Reduce metadata bloat
  • Strip unused assemblies and types.
  • Use IL2CPP_USE_SPARSEHASH for faster metadata lookups in reflection‑heavy projects.
I don't even know what some of those things mean though that didn't matter when GPT5 just optimized it for those things.
 
Last edited:
Note lately I've been using it to occassionally try and fix issues and optimize code. I normally do new functionality and organisation myself.
In my previous post it talked about LINQ - which I’ve used but I wasn’t sure how to avoid its use in an efficient way.
 
Last edited:
Back
Top Bottom