diff --git a/CMakeLists.txt b/CMakeLists.txt index 922cf95..c7fce59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ project (client) cmake_minimum_required(VERSION 3.5.1) -add_definitions(-std=c++11 -O3 -pthread) +add_definitions(-std=c++11 -O3 -flto -pthread) include_directories(include) include_directories(eigen-3.4.0) @@ -9,4 +9,4 @@ file(GLOB SOURCES src/main.cpp) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/public") add_executable(wasm-main ${SOURCES}) -set_target_properties(wasm-main PROPERTIES LINK_FLAGS "-pthread -s INITIAL_MEMORY=52428800 -s PTHREAD_POOL_SIZE=navigator.hardwareConcurrency -s EXPORTED_FUNCTIONS=['_main','_malloc','_free'] -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s EXPORT_ALL=1 -lembind") +set_target_properties(wasm-main PROPERTIES LINK_FLAGS "-O3 -flto -pthread -s INITIAL_MEMORY=52428800 -s PTHREAD_POOL_SIZE=navigator.hardwareConcurrency -s EXPORTED_FUNCTIONS=['_main','_malloc','_free'] -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s EXPORT_ALL=1 -lembind") diff --git a/public/main.js b/public/main.js index 261044e..a5f54e5 100644 --- a/public/main.js +++ b/public/main.js @@ -3,7 +3,7 @@ var dr_canvas, p_canvas var dr_ctx, p_ctx -const high_resolution = 1000, low_resolution = 100 +const high_resolution = 1000, low_resolution = 200 const enhance_resolutions = [low_resolution, 400, 800, high_resolution, 1.5 * high_resolution] const enhance_text = ["enhance", "enhance more", "enhance further", "ENHANCE", "no more enhance"]