Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: March 28, 2024, 6:39 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic Expression Compiler
#11
RE: Arithmetic Expression Compiler
Quote:if you could compile custom assembly code for them, you could multiply their efficiency by maybe 10x
I seriously doubt it. I assume most of those chips can be targeted by the C compilers that are excellent at optimizing, such as GCC or CLANG, right? That is, those chips almost certainly can't run the newest versions of GCC or CLANG (even my 12-year-old laptop has trouble running them, the newest version of TDM-GCC runs out of the 512 MB RAM if you try to compile the Duktape framework with all optimizations turned on), but it's possible to cross-compile the C code to run on those chips using those compilers? Unless you are an extremely experienced assembly-language programmer with a lot of time, you can't write more efficient Assembly than the GCC's output or the CLANG's output when the optimization is turned on.
Programming in assembly can perhaps help if the only C compilers available for those chips are the likes of Tiny C Compiler, which is very fast itself, but that comes at the price of being unable to do optimizations (which is not important if the programs it produces will only run on computers or smartphones or even Raspberry Pi, but it's a huge drawback if you target low-powered embedded systems).
But, let's be honest, when you are forced to write some part of the code in Assembly (like when you are writing a compiler), do you really worry about how efficient the code you write is? Or do you just write whatever gets the things done in fewer lines of code, even if that involves allocating 4 MB of stack just to get the next permutation of a string? In JavaScript, an equivalent code would take quite some time to execute even on modern computers, but if, you write that in Assembly or C, that would execute in an imperceptible amount of time. At least on my 12-year-old laptop, but probably not on low-powered chips...



Messages In This Thread
Arithmetic Expression Compiler - by FlatAssembler - January 2, 2019 at 3:01 am
RE: Arithmetic Expression Compiler - by bennyboy - January 2, 2019 at 7:15 am
RE: Arithmetic Expression Compiler - by Angrboda - January 2, 2019 at 9:56 am
RE: Arithmetic Expression Compiler - by FlatAssembler - January 3, 2019 at 4:47 am
RE: Arithmetic Expression Compiler - by Angrboda - January 3, 2019 at 9:27 am
RE: Arithmetic Expression Compiler - by FlatAssembler - January 3, 2019 at 12:35 pm
RE: Arithmetic Expression Compiler - by bennyboy - January 3, 2019 at 9:09 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - January 9, 2019 at 5:08 am
RE: Arithmetic Expression Compiler - by bennyboy - January 9, 2019 at 5:09 pm
RE: Arithmetic Expression Compiler - by SteelCurtain - January 9, 2019 at 10:24 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - January 10, 2019 at 8:16 am
RE: Arithmetic Expression Compiler - by bennyboy - January 10, 2019 at 10:33 am
RE: Arithmetic Expression Compiler - by FlatAssembler - January 12, 2019 at 8:02 am
RE: Arithmetic Expression Compiler - by bennyboy - January 12, 2019 at 9:36 am
RE: Arithmetic Expression Compiler - by FlatAssembler - January 31, 2019 at 3:50 am
RE: Arithmetic Expression Compiler - by bennyboy - January 31, 2019 at 8:42 am
RE: Arithmetic Expression Compiler - by FlatAssembler - February 8, 2019 at 2:30 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - May 2, 2019 at 11:00 am
RE: Arithmetic Expression Compiler - by FlatAssembler - May 10, 2019 at 3:53 am
RE: Arithmetic Expression Compiler - by Smaug - May 10, 2019 at 7:45 am
RE: Arithmetic Expression Compiler - by FlatAssembler - May 25, 2019 at 2:28 pm
RE: Arithmetic Expression Compiler - by Smaug - May 31, 2019 at 5:56 am
RE: Arithmetic Expression Compiler - by FlatAssembler - June 1, 2019 at 1:50 am
RE: Arithmetic Expression Compiler - by Smaug - June 1, 2019 at 1:24 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - June 2, 2019 at 7:26 am
RE: Arithmetic Expression Compiler - by Smaug - June 6, 2019 at 4:12 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - June 7, 2019 at 8:01 am
RE: Arithmetic Expression Compiler - by Jehanne - May 31, 2019 at 7:17 am
RE: Arithmetic Expression Compiler - by FlatAssembler - August 17, 2019 at 1:50 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - October 31, 2019 at 12:50 am
RE: Arithmetic Expression Compiler - by FlatAssembler - January 4, 2020 at 9:26 am
RE: Arithmetic Expression Compiler - by FlatAssembler - May 1, 2020 at 12:08 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - May 22, 2020 at 2:40 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - May 27, 2020 at 8:52 am
RE: Arithmetic Expression Compiler - by FlatAssembler - June 14, 2020 at 9:32 am
RE: Arithmetic Expression Compiler - by FlatAssembler - June 18, 2020 at 1:12 pm
RE: Arithmetic Expression Compiler - by arewethereyet - June 18, 2020 at 1:27 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - June 18, 2020 at 3:35 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - June 24, 2020 at 3:59 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - August 22, 2020 at 1:16 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 4:24 am
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 6:51 am
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 10:56 am
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 11:37 am
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 12:02 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 1:09 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 1:37 pm
RE: Arithmetic Expression Compiler - by Angrboda - August 30, 2020 at 12:14 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 2:01 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 2:06 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 2:15 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - August 30, 2020 at 4:39 pm
RE: Arithmetic Expression Compiler - by Grandizer - September 3, 2020 at 3:43 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - August 30, 2020 at 6:55 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - September 3, 2020 at 12:08 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - September 3, 2020 at 3:18 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - September 3, 2020 at 4:51 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - September 3, 2020 at 5:06 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - September 4, 2020 at 4:05 am
RE: Arithmetic Expression Compiler - by Angrboda - September 3, 2020 at 3:10 pm
RE: Arithmetic Expression Compiler - by BrianSoddingBoru4 - September 4, 2020 at 4:17 am
RE: Arithmetic Expression Compiler - by FlatAssembler - September 21, 2020 at 3:12 pm
RE: Arithmetic Expression Compiler - by HappySkeptic - September 24, 2020 at 1:12 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - October 5, 2020 at 5:01 pm
RE: Arithmetic Expression Compiler - by HappySkeptic - October 5, 2020 at 9:12 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - October 6, 2020 at 1:55 pm
RE: Arithmetic Expression Compiler - by FlatAssembler - October 18, 2020 at 9:11 am
RE: Arithmetic Expression Compiler - by FlatAssembler - July 17, 2021 at 12:29 pm
RE: Arithmetic Expression Compiler - by arewethereyet - July 17, 2021 at 12:36 pm

Possibly Related Threads...
Thread Author Replies Views Last Post
  Compiler Theory FlatAssembler 5 986 October 27, 2020 at 10:48 am
Last Post: Angrboda



Users browsing this thread: 1 Guest(s)