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
### Keybase proof | |
I hereby claim: | |
* I am isicju on github. | |
* I am isicju (https://keybase.io/isicju) on keybase. | |
* I have a public key ASAz-pwHFoER4sn0ciLQpc523lnfe10QRdP3DHww6dC9ugo | |
To claim this, I am signing this object: |
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
package com.example.demo.multi; | |
import java.util.*; | |
import java.util.concurrent.CopyOnWriteArrayList; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.atomic.AtomicReference; | |
import java.util.concurrent.locks.ReadWriteLock; | |
import java.util.concurrent.locks.ReentrantLock; | |
import java.util.concurrent.locks.ReentrantReadWriteLock; |
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
package old.keke; | |
import org.openjdk.jol.info.GraphLayout; | |
/* | |
last optimization - using short mask for booleans | |
*/ | |
public class FootPrint { | |
static final short IS_MALE = 0, IS_EXISTENT_USER = 1, IS_KNOWN_CUSTOMER = 2, IS_BANNED_USER = 3,IS_PREMIUM_USER = 4, |
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
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.dataformat.xml.XmlMapper; | |
import com.google.gson.Gson; | |
import java.util.Arrays; | |
public class Refactoring { | |
final static Converter<Object, String> JSON_CONVERTER = (object) -> { |
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
import java.util.*; | |
import static java.lang.Thread.currentThread; | |
public class Main { | |
static class ThreadPool { | |
Queue<Runnable> tasks = new LinkedList<>(); | |
public ThreadPool() { | |
Thread mainWorker = new Thread(() -> { |
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
package com.example.demo.size; | |
import java.util.UUID; | |
public class UserCache { | |
public static void main(String[] args) { | |
User[] cachedUsers = new User[1_000_000]; | |
for (int i = 0; i < 1_000_000; i++) { | |
User tempUser = new User(); | |
tempUser.id = (long) i; |
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
package com.example.demo; | |
import lombok.AllArgsConstructor; | |
import lombok.Data; | |
import lombok.extern.log4j.Log4j2; | |
import org.apache.activemq.ActiveMQConnectionFactory; | |
import javax.jms.*; | |
import java.io.Serializable; | |
import java.util.*; |
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
Project module name | ACCELERATION | |
---|---|---|
Guava parent project build | 5.7x faster | |
Guava core build | 1.4x faster | |
Guava Testing build | SPEE 1.28x faster | |
Guava unit tests | 1.31x faster | |
Guava GWT build | 1.26x faster |
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
mvn clean install |
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
java -jar target/sparkexample-jar-with-dependencies.jar |