{"id":1482,"date":"2007-03-02T00:00:00","date_gmt":"2007-03-01T15:00:00","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/archives\/1482"},"modified":"2007-03-02T00:00:00","modified_gmt":"2007-03-01T15:00:00","slug":"pepsi%e5%ad%a6%e7%bf%92%e4%b8%ad-2","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/1482","title":{"rendered":"pepsi\u5b66\u7fd2\u4e2d"},"content":{"rendered":"<div class=\"section\">\n<p>\u3053\u306e\u3068\u3053\u308d\u672c\u696d\u304c\u5fd9\u3057\u304f\u3066pepsi\u3068\u904a\u3076\u6642\u9593\u304c\u306a\u3044\u306e\u3067\u3059\u304c\u5408\u9593\u306b\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\u5e74\u5ea6\u672b\u306b\u5b66\u751f\u3055\u3093\u306b\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8ab2\u984c\u306e\u4e00\u3064\u3001\u300c\uff11\uff10\uff10\uff10\u307e\u3067\u306e\u6574\u6570\u304b\u3089\u30e6\u30cb\u30fc\u30af\u306b\uff11\uff10\uff10\u500b\u3092\u9078\u3076\u300d\u3067\u3059\u3002<\/p>\n<p>\u5225\u306b\u51dd\u3063\u3066\u3082\u3044\u306a\u3044\u3057\u4eba\u306b\u898b\u305b\u308b\u3088\u3046\u306a\u3082\u306e\u3067\u3082\u306a\u3044\u306e\u3067\u3059\u304c&#8230;<\/p>\n<pre>\n{ import: st80 }\n\"----------------------------------------------------------------\"\nRandom : Object ( seed a m q r )\nRandom new\n[\n^super new init\n]\nRandom init\n[\n[seed := (Time millisecondClockValue bitAnd: 16r3FFFFFFF) bitXor: self hash.\nseed = 0] whileTrue.\na := 16807 asFloat.\nm := 1073741823 asFloat * 2.0.\nq := (m quo: a) asFloat.\nr := (m ?? a) asFloat.\n]\nRandom next\n[\n^(seed := self nextValue) \/ m.\n]\nRandom nextValue\n[\n| lo hi aLoRHi |\nhi := (seed quo: q) asFloat.\nlo := seed - (hi * q).  \" = seed rem: q\"\naLoRHi := (a * lo) - (r * hi).\n^(aLoRHi &#62; 0.0) ifTrue: [aLoRHi] ifFalse: [aLoRHi + m].\n]\nRandom nextInt: anInteger\n[\n^(self next * anInteger) truncated\n]\nTime : Magnitude ( _seconds _nanoseconds )\nTime seconds\t\t[ ^SmallInteger value_: _seconds ]\nTime nanoseconds\t[ ^SmallInteger value_: _nanoseconds ]\nTime millisecondClockValue\n{\nstruct timeval tv;\ngettimeofday(&tv, 0);\nreturn (oop)(((tv.tv_sec * 1000 + tv.tv_usec \/ 1000) &0x3fffffff) &#60;&#60; 1 | 1);\n}\n\"----------------------------------------------------------------\"\n[\n| r c v start msec |\nstart := Time millisecondClockValue.\nr := Random new.\nc := Set new.\n[ v := r nextInt: 1000.\nc add: v.\nc size &#60; 100] whileTrue.\nmsec := Time millisecondClockValue - start.\nc println.\nmsec println.\n]\n<\/pre>\n<p>\u4e71\u6570\u751f\u6210\u304cst80\u306b\u306a\u304f\u3001jolt\u304b\u3089\u5f15\u3063\u5f35\u3063\u3066\u304d\u305f\u306e\u3067\u3048\u3089\u304f\u9577\u3044\u3067\u3059\u304c\u3001\u672c\u4f53\u306f\u4e00\u756a\u6700\u5f8c\u306e\u30d6\u30ed\u30c3\u30af\u3067\u3059\uff08\u3044\u305f\u3063\u3066\u7d20\u76f4\u306a\u30b3\u30fc\u30c9\uff1f\uff09\u3002\u7a2e\u306e\u751f\u6210\u306b\u30df\u30ea\u79d2\u3092\u4f7f\u3063\u3066\u3044\u308b\u3093\u3067\u3064\u3044\u3067\u306b\u5b9f\u884c\u6642\u9593\u3082\u6e2c\u3063\u3066\u307f\u307e\u3057\u305f\u3002\uff08start\u3068msec\u306e\u3068\u3053\u308d\u3067\u3059\uff09<\/p>\n<p>\u5b9f\u884c\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002<\/p>\n<pre>\nSet(512 259 775 263 778 523 268 13 526 787 533 21 281 282 795 540 26 28 799 546 804 550 808 302 305 821 822 55 317 61 320 68 587 591 593 851 852 596 341 87 597 601 343 348 97 101 616 106 877 366 115 630 119 632 889 378 127 134 137 907 909 912 656 914 144 662 153 665 921 163 167 939 431 944 177 688 436 182 697 698 191 706 965 710 967 455 977 724 988 991 738 484 999 493 496 499 759 506 253 765)\n9\n<\/pre>\n<p>9ms\u3067\u3059\u304b\u3002\u7d50\u69cb\u304b\u304b\u3063\u3066\u307e\u3059\u3002\u6700\u5f8c\u306e\u30d6\u30ed\u30c3\u30af\u3092squeak\u306eworkspace\u306b\u8cbc\u4ed8\u3051\u3066\u5b9f\u884c\u3059\u308b\u30682ms\u3067\u3059\u3002\u307e\u3042\u3001\u3053\u306e\u7a0b\u5ea6\u306e\u30b3\u30fc\u30c9\u3067\u5b9f\u884c\u6642\u9593\u3092\u6e2c\u3063\u3066\u3082\u610f\u5473\u306a\u3044\u3067\u3059\u3051\u3069\u306d\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u306e\u3068\u3053\u308d\u672c\u696d\u304c\u5fd9\u3057\u304f\u3066pepsi\u3068\u904a\u3076\u6642\u9593\u304c\u306a\u3044\u306e\u3067\u3059\u304c\u5408\u9593\u306b\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002\u5e74\u5ea6\u672b\u306b\u5b66\u751f\u3055\u3093\u306b\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8ab2\u984c\u306e\u4e00\u3064\u3001\u300c\uff11\uff10\uff10\uff10\u307e\u3067\u306e\u6574\u6570\u304b\u3089\u30e6\u30cb\u30fc\u30af\u306b\uff11\uff10\uff10\u500b\u3092\u9078\u3076\u300d\u3067\u3059\u3002 \u5225\u306b\u51dd\u3063\u3066\u3082\u3044\u306a\u3044\u3057\u4eba\u306b\u898b&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-1482","post","type-post","status-publish","format-standard","hentry","category-21"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=1482"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1482\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=1482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=1482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=1482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}