This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <uv.h> | |
//based on https://gist.githubusercontent.com/snatchev/5255976/ | |
//raw/8392c42d719bb775053036e32b21affdf932c1b7/libuv-tcp-client.c | |
//which was based on libuv 0.1, there is considerable difference there. | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//With the updated json parsing as of May 8, 2017, the speed of extraction from JSON string increased more than twice: | |
//using old API it took 7.2 seconds, with new API, it took 2.3 sec) | |
//the new API allows decoding JSON with a sequence of field names to specify the element to be extracted. | |
package main | |
import "time" | |
import ( | |
"fmt" | |
"github.com/xiaost/jsonport" | |
) |