Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • JarkkoL's Avatar
    02-12-2023, 04:05 PM
    I don't think you give CM7 the credit it deserves regarding branch prediction, which coupled with dual-issue pipe enables zero cost loops. Not sure how you managed to miss it while reading those articles. Fixed size...
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-12-2023, 06:22 AM
    The looping adds extra work for the processor but it doesn't necessarily add extra cost because ILP - there's a difference, and the cost is what we care about not work. Here's a good explanation what that means:...
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-11-2023, 09:17 AM
    Teensy 4 seems to have branch prediction and also much bigger cache than Teensy LC for example. If you expand the code size by unrolling, the MCU has to be fetching the code from flash more frequently slowing things...
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-09-2023, 08:46 AM
    Yeah, but that statement has no side-effect (i.e. does nothing). Should have "max=std::max(max, 10.0f);" to clamp the <10.0f values to 10.0f For unrolling, did you have fixed loop count for your test or did you use...
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-09-2023, 08:17 AM
    Ok, there's a bug in the code, where you should assign std::max() result to max. Depending on the architecture the loop unrolling may actually hurt performance in terms of instruction cache misses and because some...
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-09-2023, 06:28 AM
    Ah, didn't see. Can you show what's the current optimized version?
    41 replies | 1397 view(s)
  • JarkkoL's Avatar
    02-08-2023, 08:55 PM
    You could remove the second loop in NormalizeSignal() and just return the max, then perform the normalization while calculating the abs delta in ComputeManhattan().
    41 replies | 1397 view(s)
No More Results
About JarkkoL

Basic Information

Statistics


Total Posts
Total Posts
149
Posts Per Day
0.04
Last Post
Help me optimise this code 02-12-2023 04:05 PM
General Information
Last Activity
02-27-2023 03:58 PM
Join Date
07-11-2013