You searched for: optimization (Koreanska - Japanska)

Datoröversättning

Att försöka lära sig översätta från mänskliga översättningsexempel.

Korean

Japanese

Info

Korean

optimization

Japanese

 

Från: Maskinöversättning
Föreslå en bättre översättning
Kvalitet:

Mänskliga bidrag

Från professionella översättare, företag, webbsidor och fritt tillgängliga översättningsdatabaser.

Lägg till en översättning

Koreanska

Japanska

Info

Koreanska

dba_optimize() returns true or false, if the optimization succeeds or fails, respectively.

Japanska

dba_optimize() は、最適化に成功した場合に true, 失敗した場合に false を返します。

Senast uppdaterad: 2011-10-24
Användningsfrekvens: 1
Kvalitet:

Koreanska

you can include optimization options in the compilation command, although these have been omitted in this example (but some are included in the makefile template described in an earlier section).

Japanska

you can include optimization options in the compilation command, although these have been omitted in this example (but some are included in the makefile template described in an earlier section).

Senast uppdaterad: 2011-10-24
Användningsfrekvens: 1
Kvalitet:

Koreanska

certain items that may appear in patterns are more efficient than others. it is more efficient to use a character class like [aeiou] than a set of alternatives such as (a_bar_e_bar_i_bar_o_bar_u). in general, the simplest construction that provides the required behaviour is usually the most efficient. jeffrey friedl's book contains a lot of discussion about optimizing regular expressions for efficient performance. when a pattern begins with .* and the pcre_dotall option is set, the pattern is implicitly anchored by pcre, since it can match only at the start of a subject string. however, if pcre_dotall is not set, pcre cannot make this optimization, because the. metacharacter does not then match a newline, and if the subject string contains newlines, the pattern may match from the character immediately following one of them instead of from the very start. for example, the pattern (.*) second matches the subject "first\nand second" (where \n stands for a newline character) with the first captured substring being "and". in order to do this, pcre has to retry the match starting after every newline in the subject. if you are using such a pattern with subject strings that do not contain newlines, the best performance is obtained by setting pcre_dotall, or starting the pattern with ^.* to indicate explicit anchoring. that saves pcre from having to scan along the subject looking for a newline to restart at. beware of patterns that contain nested indefinite repeats. these can take a long time to run when applied to a string that does not match. consider the pattern fragment (a+)* this can match "aaaa" in 33 different ways, and this number increases very rapidly as the string gets longer. (the * repeat can match 0, 1, 2, 3, or 4 times, and for each of those cases other than 0, the + repeats can match different numbers of times.) when the remainder of the pattern is such that the entire match is going to fail, pcre has in principle to try every possible variation, and this can take an extremely long time. an optimization catches some of the more simple cases such as (a+)*b where a literal character follows. before embarking on the standard matching procedure, pcre checks that there is a "b" later in the subject string, and if there is not, it fails the match immediately. however, when there is no following literal this optimization cannot be used. you can see the difference by comparing the behaviour of (a+)*\d with the pattern above. the former gives a failure almost instantly when applied to a whole line of "a" characters, whereas the latter takes an appreciable time with strings longer than about 20 characters.

Japanska

パターンの幾つかの要素は、他の要素よりもより効率的です。 (a_bar_e_bar_i_bar_o_bar_u) のような選択肢の集合よりも [aeiou] のような文字ク ラスの方がより効率的です。一般に、構成が最も簡単なものが たいてい最も効率が良いです。jeffrey friedl の本には、 性能向上のために正規表現の最適化に関する多くの議論が 記述されています。 パターンが .* で始まり、 pcre_dotall オプションが設 定されている場合、対象文字列の始端でしかまっちできないため、パター ンはpcreにより暗黙のうちにアンカー付きとなります。 しかし、 pcre_dotall が設定されていない場合、メタ文字. が改行にマッチしないので、pcre はこの最適化を行えません。 対象文字列が改行を含む場合、パターンは文字列の始端からではなく 各改行の直後の文字からマッチする可能性があります。例えば、 パターン (.*) second は、対象文字列 "first\nand second" (ただし、\n は改行文字を 意味します) にマッチします。 最初に値を取得される部分文字列は、"and" になります。これを動 作させるには、pcre は対象文字列の各改行の後からマッチを再度 開始する必要があります。 このようなパターンを改行を含まない対象文字列に使用した場合、 pcre_dotall を設定す るか、アンカー付きであることを陽に示すためにパターンを ^.* で開始 することにより最高の性能が得られます。 これにより、pcre が対象文字列の改行を探し、そこで再スタート することを防止します。 ネストした未確定の反復を有するパターンには注意を要します。 このパターンをマッチしない文字列に適用した場合には、実行に長い時 間を要します。次のパターンを考えてみましょう。 (a+)* これは、33通りの異なった方法で、"aaaa"にマッチします。この数は、 文字列が長くなるにつれて急激に増大します。(* 反復は、0、1、2、3、 4回マッチし、0以外の各々のケースで、+反復は異なった回数分マッチし ます) パターンの残りにマッチ全体が失敗するようなパターンである場 合、pcreは基本的に全ての可能性がある選択肢を調べるため、非常に長 い時間がかかります。 次のように文字リテラルが後にあるようなより簡単な場合には最適化が 可能です。 (a+)*b 標準のマッチ手順に着手する前に、pcreは対象文字列の後の方に"b"があ るかどうかを調べます。これがない場合には、直ちにマッチは失敗しま す。しかし、リテラルが後にない場合には、この最適化を使用すること はできません。以下のパターンと上のパターンの動作の差異を比較して みましょう。 (a+)*\d 前者は、全体が "a" 文字である行に適用された場合にほぼ瞬間的に失敗 と判定します。一方、後者では、およそ20文字より長い文字列ではかな りの時間がかかります。

Senast uppdaterad: 2011-10-24
Användningsfrekvens: 1
Kvalitet:

Varning: Innehåller osynlig HTML-formatering

Få en bättre översättning med
7,742,650,078 mänskliga bidrag

Användare ber nu om hjälp:



Vi använder cookies för att förbättra din upplevelse. Genom att fortsätta besöka den här webbplatsen godkänner du vår användning av cookies. Läs mer. OK