type  myrecord = record      x,y,z:integer;  end; var     lst:tlist<myrecord>;     a:integer; begin     a := lst[0].x;     a: = lst.list[0].x end;

    a := lst[0].x;     a: = lst.list[0].x  这两个 那个速度快?

 第二个会快很多(很多也是比对第一个,如果和整体比占多少才是对效率提高多少)

因为第一个会产生一次隐含的record复制

 隐含的record复制是因为哪个原因引起的,是因为default? ,还是因为这个?

因为属性多赋值了中间值的Result?

平时没注意这个。。。看来以后要少用带索引的属性。

相关文章:

  • 2022-01-28
  • 2021-08-17
  • 2021-09-30
  • 2022-01-15
  • 2021-12-06
  • 2021-09-14
  • 2021-10-03
  • 2022-02-05
猜你喜欢
  • 2021-06-06
  • 2022-12-23
  • 2021-12-01
  • 2021-11-18
  • 2021-10-23
  • 2021-12-07
相关资源
相似解决方案