Upgrade to Pro — share decks privately, control downloads, hide ads and more …

最適化 (2012)

最適化 (2012)

4D Japan

August 31, 2023
Tweet

More Decks by 4D Japan

Other Decks in Programming

Transcript

  1. easy optimisation ؆୯ʹͰ͖Δ࠷దԽ .BD1SP w .BD1SP  w Y2VBE$PSF*OUFM9FPO w

    $PSFT w ()[ w (#3". w 8%$BWJBS(#)%% .BD#PPL1SP w .BD#PPL1SP  w *OUFM$PSF%VP w $PSFT w ()[ w (#3". w *OUFM9.(#44% )%%WT44%
  2. miscellaneous optimisation ͍Ζ͍Ζͳ࠷దԽ 3ίϯύΠϥࢦࣔࢠ For ($i;1;$kLOOP_COUNT) For ($j;1;$kSIZE) $ignore:=$array{$i} End

    for End for ࠷ ߴ  ଎ ౓ Ξ ο ϓ  ਺ े ԯ ճ ϧ ʔ ϓ ͢ Ε ͹ ɼ ͷ ࿩ Ͱ ͢ ͕ ɻ
  3. cache function results ؔ਺ͷ஋ΛऔΓ෼͚Δ theValue:=0 For ($i;1;$L_kMAX) theValue:=theValue+Size of array(theArray)

    End for theValue:=0 size:=Size of array(theArray) For ($i;1;$L_kMAX) theValue:=theValue+size End for Y ΠϯλϓϦλ Y ίϯύΠϧ
  4. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ຖʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ)
  5. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ஔ͖ʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ) αʔόʔʹૹΒΕΔϦΫΤετͷ਺͸
  6. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ஔ͖ʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ) αʔόʔʹૹΒΕΔϦΫΤετͷ਺͸  
  7. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ஔ͖ʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ) αʔόʔʹૹΒΕΔϦΫΤετͷ਺͸      
  8. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ஔ͖ʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ) αʔόʔʹૹΒΕΔϦΫΤετͷ਺͸
  9. cleanup your code ͝Έࣺͯ ΫϥΠΞϯτͰ෼ஔ͖ʹ࣮⾏行行 QUERY(<੥ٻ>;...)  ݅΄Ͳͷ੥ٻॻ CREATE SET(<ސ٬>;ސ٬੥ٻॻ)

    FIRST RECORD(<੥ٻ>) While (Not(End selection(<੥ٻ>))) QUERY(<ސ٬>;<ސ٬>*%=<੥ٻ>ސ٬*%) ADD TO SET(<ސ٬>;ސ٬੥ٻॻ) NEXT RECORD(<੥ٻ>) End while USE SET(ސ٬੥ٻॻ) αʔόʔʹૹΒΕΔϦΫΤετͷ਺͸
  10. data and server σʔλͱαʔόʔ • ແҙຯͳϦΫΤετ ‣ '*3453&$03% -0"%3&$03% 

    ΄Μͱ͏ʹඞཁ • ηοτͱ໋໊ηϨΫγϣϯͷείʔϓ • ϓϦΤϜϓςΟϒʹͳΓ·͠ΐ͏ • ΠϯσοΫε͕஗͞ͷݪҼʹͳΔ͜ͱ΋͋Δ • ΩϟογϡΛཧղ͢Δ