All the results are shown in second.
num | push_back | resize | reserve | emplace_back | reserve alt | resize alt |
---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 0 | 0 |
2000000 | 1.39 | 0.422 | 0.984 | 1.312 | 0.953 | 0.406 |
4000000 | 2.813 | 0.843 | 1.985 | 2.734 | 1.906 | 0.797 |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
using System; | |
public class EchoTest : MonoBehaviour { | |
WebSocket w; | |
int myid = -1; | |
public Text output; |
function main() { | |
var count_before = loadCount(); | |
var count_today = getCountToday(); | |
var count_sum = count_before + count_today; | |
Logger.log(count_sum); | |
saveCount(count_sum); | |
} | |
function getCountToday() { |
require "google/cloud/logging" | |
class StackdriverLogger < Google::Cloud::Logging::Logger | |
module EntryRefinement | |
refine Google::Cloud::Logging::Entry do | |
attr_accessor :http_request | |
end | |
end | |
using EntryRefinement |
import * as cdk from '@aws-cdk/core'; | |
import * as ecs from '@aws-cdk/aws-ecs'; | |
import * as efs from '@aws-cdk/aws-efs'; | |
import * as ec2 from '@aws-cdk/aws-ec2'; | |
export class FargateStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const vpc = new ec2.Vpc(this, 'vpc'); |
resource "aws_s3_bucket" "aws_config_bucket" { | |
bucket_prefix = "aws-config-" | |
server_side_encryption_configuration { | |
rule { | |
apply_server_side_encryption_by_default { | |
sse_algorithm = "AES256" | |
} | |
} | |
} | |
} |
#!/bin/bash | |
# A shell script to create AWS resources for Terraform S3 backend | |
STACK_NAME=TerraformStateStack-6nc8asv # add random suffix to prevent from colliding with any existing stacks | |
TEMPLATE_PATH="$(dirname "$0")/workspace_cfn.yaml" | |
aws cloudformation deploy --stack-name $STACK_NAME --template-file $TEMPLATE_PATH --no-cli-pager | |
aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].Outputs" --no-cli-pager |
import { Construct } from 'constructs'; | |
import { aws_databrew as databrew } from 'aws-cdk-lib'; | |
import { IBucket } from 'aws-cdk-lib/aws-s3'; | |
import { IRole } from 'aws-cdk-lib/aws-iam'; | |
export interface JobProps { | |
readonly name: string; | |
readonly inputBucket: IBucket; | |
readonly inputKey: string; | |
readonly outputBucket: IBucket; |
const https = require('https') | |
exports.handler = async (event) => { | |
console.log(event) | |
const req = event.requestContext.http; | |
const sourceIp = req.sourceIp; | |
// can perform IP address restriction here | |
// e.g. if (sourceIp != "11.4.51.4") throw new Error() |
具体的なコマンドはこちらに: https://github.com/tmokmss/isucon12q-infra