Skip to main content
Neil's user avatar
Neil's user avatar
Neil's user avatar
Neil
  • Member for 10 years, 6 months
  • Last seen this week
Stats
174,388
reputation
5.2m
reached
5,976
answers
7
questions
Loading…
About

What effect would a transpose builtin have on Charcoal? 35 of my Charcoal answers contain the word "transpose", but some of them don't seem to be relevant or will only save at most one byte. Of the other answers:

  • 3 bytes are saved:
    • by 255406 and 255452 because the array was of height 2 and known width
    • if the answer transposes an array of known width which has to be mapped over anyway, e.g. 165088, 235913, 243142
  • 4 bytes are saved if the answer transposes an array of unknown width which has to be mapped over anyway, e.g. 226778
  • 5 bytes are saved:
  • 6 bytes are saved if the answer transposes an array of unknown width, e.g. 169410, 222934, 241967, 255100, 256984, 265782
  • 7 bytes are saved:
    • by 213927 because although the array is of known width the newer version of Charcoal can then apply vectorisation instead of mapping
    • by 235875 because it currently uses a different storage format to reduce the byte count of the two "transpose" operations
  • 8 bytes are saved:
    • by 195368 because although the array is of unknown width the newer version of Charcoal can process the results more efficiently
    • by 258164 because although the array is of unknown width it doesn't have to be stored in a temporary variable
  • 12 bytes are saved by 219441 because although the array is twice of known width the newer version of Charcoal can then apply vectorisation instead of mapping
12
gold badges
73
silver badges
277
bronze badges
16,609
Score
5,808
Posts
97
Posts %
4,443
Score
1,410
Posts
24
Posts %
3,020
Score
729
Posts
12
Posts %
2,031
Score
813
Posts
14
Posts %
1,898
Score
420
Posts
7
Posts %
1,754
Score
724
Posts
12
Posts %
Top posts
View all questions and answers